-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class for statevars and argsdef as dict #4
Comments
Yeah, that could do with a bit of attention, you're right. I wonder if there's a way to include their uPnP 'type' so that we can provide (un)marshal and validation methods too. I'm happy with changing |
As mentioned in flyte#4
Includes validation and type marshaling (as discussed in flyte#4)
I just did the work and refactored the argsdef lists to dicts and implemented the class It's completely untested yet as I currently have no UPnP devices around me (and not even a Python runtime, indeed). I will test it this evening and make a PR. The Do you mind backward compatibility? Then I could add
|
Good work! I had a quick look through just now - looks good. If you've got time, I'd appreciate it if you could update the Readme to reflect the changes, as it's now wrong. You may find there are some tests which fail now too. I'd like to keep I'm not that fussed about backward compatibility at the moment. Anyone can still use PS. I'm on holiday for two weeks from Saturday, so if I stop replying, please don't get offended :) |
I will have a look at Readme and examples and run the tests. As mentioned, this was completely "blind coding" as I could not even run it in Python. I completely agree to use marshal.py. Well, it's hard as I did already got used to your fast answering. 😄 But have a great holiday! |
What do you think about a class for representing statevars?
Currently they are just a dict in another dict
Service.statevars
And another related wish:
Statevars are held in
argsdef_in
andargsdef_out
as a list of tuples of arg_name and the actual statevar.Would you mind if I change argsdef_in and _out to dictionaries of
{ arg_name: statevar }
This would make processing of an action result simpler (currently I have to convert the argsdef_out to a dict first).
The text was updated successfully, but these errors were encountered: