Opened 9 years ago
Closed 9 years ago
#25611 closed Cleanup/optimization (fixed)
Use a common descriptor signature
Description ¶
Currently we have several different signatures for descriptor methods __get__()
and __set__()
:
Curtis proposed:
- "instance_type" is explicit
- "cls" is a common convention for passing a class
- "owner" is in the docs {but so are others}
- and "type" I think is a bit confusing...
So... my preference, upon reflection, would be: def __get__(self, instance, cls=None)
This got several +1s on the mailing list.
Change History (3)
comment:1 by , 9 years ago
Has patch: | set |
---|
comment:2 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
PR