Home/Support/Support Forum/Python descriptors in XB3?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Python descriptors in XB3?

0 votes
I want to use python descriptors (__get__, __set__, __delete__) in micropython on XBee3. Micro python has to be compiled with that option enabled. Does anyone know if XBee3 MicroPython supports descriptors?
asked Nov 15, 2019 in Python by kc64 New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
No it currently does not support descriptors.
answered Nov 19, 2019 by mvut Veteran of the Digi Community (14,338 points)
If I want to recompile MicroPython with the descriptor flag turned on, is there anything that would prevent me from doing so? Do I need any code from Digi that is not publicly available?
Since the module does not support this, I am not sure.  I suppose if you were able to find the proper lib and add that to your code, then it might work.
@mvut: Descriptors cannot be added to my code by including "the proper lib". Rather, support for them is only available if MicroPython is compiled with the correct flag setting. The Digi XBee port does not appear to be publicly available which means that I cannot do much to fix this AFAIK.

Some may argue that descriptors are unnecessary and will slow down the system. Others show numbers that demonstrate improved performance with their use.

I mainly want the feature because it provides a very elegant way to abstract the hardware interface.