-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix typos in PEP 698 #2830
Fix typos in PEP 698 #2830
Conversation
Fix some typos. Would like to give some comments to the PEP as the maintainer of overrides package, but I'll do it on reddit for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! cc @stroxler but I'll merge this once CI is green because the typos are obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
My comments about the PEP https://www.reddit.com/r/Python/comments/xmnv04/comment/irw9prw/?utm_source=share&utm_medium=web2x&context=3 The package https://github.com/mkorpela/overrides exists basically because this functionality has been missing from Python and was in many other languages that I had previously used. First version dates back to 2011 and this answer to stackoverflow.com/a/8313042 . Based on usage statistics of the package, I think the functionality is shown to be valuable. The PEP 698 proposes a decorator with no runtime impact at all ( similar to typing module final pep-0591 ). When final was introduced to typing module, I tried to integrate it to overrides package overrides/issues/49. The problem was that there seems to be no runtime trace of the decorator. This means it can not be used. Calling the decorator inside of my own decorator did not seem to help. I think when using a decorator as an annotation, there should be a runtime trace of its existence. Leaving no metadata trace, will mean no ability to use it for dynamic reasoning about the code during runtime. I think dynamic reasoning is an important ability in Python. In overrides case dynamic reasoning is used to copy doc strings from the super class method to the method that is overriding it." |
My reaction (https://www.reddit.com/r/Python/comments/xmnv04/comment/irwbk7e/?utm_source=share&utm_medium=web2x&context=3) Our main concern was the order of decorators, which is tricky to get right in all cases. In particular, to get reliable runtime behavior That's not something a user can get right unless they know the implementation of every decorator they use on an override method. We felt like that's a pretty high barrier to entry, since there's no signal about whether a decorator is wrapper- or descriptor-based in the syntax. I guess this brings me to two questions:
|
Yes I would be fine. The functionality as a separate package has been around for years.
Maybe for some transition period 🤔 . |
FYI, the PEP discussion thread would likely be a better place to discuss this than a PR on the PEPs repo fixing typos...but I don't see it linked in the PEP (I'm guessing it is maybe on Typing-SIG somewhere)? @JelleZijlstra do you think you could add it to the appropriate headers? |
Fix some typos. Would like to give some comments to the PEP as the maintainer of overrides package, but I'll do it on reddit for example.