[Python-Dev] special method lookup: how much do we care? (original) (raw)
Benjamin Peterson benjamin at python.org
Sun May 10 03:25:28 CEST 2009
- Previous message: [Python-Dev] special method lookup: how much do we care?
- Next message: [Python-Dev] special method lookup: how much do we care?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2009/5/9 Greg Ewing <greg.ewing at canterbury.ac.nz>:
Are we solving an actual problem by changing the behaviour here, or is it just a case of foolish consistency?
"No implementation detail is obscure enough."
For example, Maciek Fijalkowski of PyPy told me that he cares about this because someone is bound to eventually rely on it, and PyPy will have to follow CPython.
Seems to me that trying to pin down exactly what constitutes a "special method" is a fool's errand, especially if you want it to include enter and exit but not reduce, etc.
IMO, if it's a callable that begins with __ and ends with __, it's a special method.
-- Regards, Benjamin
- Previous message: [Python-Dev] special method lookup: how much do we care?
- Next message: [Python-Dev] special method lookup: how much do we care?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]