Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature Request: Add a generic property class #758
Comments
|
I'm not sure what this give beyond the standard property. Is there anything in your example program whose type gets inferred incorrectly in your example if you just use |


Can you add a generic counterpart to the
propertydecorator class to allow for proper typing of object properties. This would align with many other new classes in thetypinglibrary to improve type hinting in our code.Here's my stab at an implementation:
This would allow us to do the following:
I'm not sure if I have all the subtleties of the implementation correct, however my own cursory tests on python 3.9 work.