Property assignment does not work with classmethod in MicroPython? #16344
Replies: 3 comments
-
Micropython is based off the Python 3.4 specs , with several features and functionality from newer CPython versions as documented in https://docs.micropython.org/en/latest/genrst/index.html |
Beta Was this translation helpful? Give feedback.
-
https://docs.python.org/3.11/whatsnew/3.11.html#language-builtins
|
Beta Was this translation helpful? Give feedback.
-
Yeah, was not assuming just asking, if MicroPython did it. A clarification question. In my use case would have been of benefit... easy to leverage. As to 'wrapped' attribute thank you, excellent referencing. I prefer to use properties when things are 'read' only if you well, it communicates to the user that this method is 'read' only. Ignoring the 'setter' versus a simple function declaration, but I digress. Very interesting reading about the issue. First came across 'wrappers' in passing arguments to Timers... in MicroPython. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Property assignment does not work with classmethod in MicroPython?
Regular python I would get the actual value printed, i.e. 10. If I flip the attributes I get "'<bound method>'", so appears the parser only honors the first property found? As I recall Python 3.11 now allows multiple attributes or directives assignment. https://docs.python.org/3.11/library/functions.html#classmethod https://docs.python.org/3.11/library/functions.html#propery
Beta Was this translation helpful? Give feedback.
All reactions