| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ut __doc__ Subclasses created using the C API don't get __dict__, which means their __doc__ can't be set for each property separately. The __doc__ descriptor from `property` itself is shadowed by the subclass's docstring. This edge case isn't really worth mentioning in the docs. This adds a note that should guide anyone encountering the issue to the right fix.
|
See #105262 - I'm restoring the previous behavior. |
Sorry, something went wrong.
|
we've reverted the behavior. if we re-attempt this behavior change it'll presumably be a deprecation cycle first (warning) followed ultimately by an error in which something like this note would make sense. (good idea!) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Subclasses created using the C API don't get __dict__, which means their __doc__ can't be set for each property separately. The __doc__ descriptor from property itself is shadowed by the subclass's docstring.
This edge case isn't really worth mentioning in the docs. This adds a note that should guide anyone encountering the issue to the right fix.
The newfangled __notes__ mechanism is as non-invasive as it gets -- it even retains the original exception object -- while getting the information to the surprised user.
(The message is longer than typical error messages, but IMO it's better to explain here than in the docs, where 99%+ of the readers don't need it.)