- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | jdufresne |
|---|---|
| Recipients | docs@python, jdufresne |
| Date | 2019-04-27.17:56:42 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1556387803.45.0.177981206888.issue36743@roundup.psfhosted.org> |
| In-reply-to |
| Content |
|---|
Here: https://docs.python.org/3/reference/datamodel.html#object.__get__ The __get__ signature is defined as: object.__get__(self, instance, owner) But here: https://docs.python.org/3/howto/descriptor.html#descriptor-protocol It is defined as: descr.__get__(self, obj, type=None) It is not clear to me as a reader if all descriptors should have the owner/type argument default to None or if it should be required. If it should default to None, I think all doc examples should follow this expectation to make it clear to someone implementing a descriptor for the first time. As best I can tell, the owner/type is always passed. So perhaps the =None shouldn't be there. Grepping the CPython code, I see lots of definitions for both required and optional, adding more confusion for me. If there is a definitive answer, I'm happy to follow through by updating the docs. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-04-27 17:56:43 | jdufresne | set | recipients: + jdufresne, docs@python |
| 2019-04-27 17:56:43 | jdufresne | set | messageid: <1556387803.45.0.177981206888.issue36743@roundup.psfhosted.org> |
| 2019-04-27 17:56:43 | jdufresne | link | issue36743 messages |
| 2019-04-27 17:56:42 | jdufresne | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
