[Python-3000] special attrs looked up on the type, not instance (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 15 00:31:40 CET 2007
- Previous message: [Python-3000] __special__ attrs looked up on the type, not instance
- Next message: [Python-3000] __special__ attrs looked up on the type, not instance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
We could even do this by hacking the default getattr implementation to skip the instance dict if the name starts and ends with two underscores.
But unless I'm mistaken, this behaviour is only appropriate for methods, and you can't tell just from whether the name has double underscores whether it's a method or not.
-- Greg
- Previous message: [Python-3000] __special__ attrs looked up on the type, not instance
- Next message: [Python-3000] __special__ attrs looked up on the type, not instance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]