[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc. (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 15 03:42:19 CEST 2007
- Previous message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Next message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phillip J. Eby wrote:
If you have only strict precedence (i.e., methods with the same signature are ambiguous), you wind up in practice needing a way to disambiguate methods when you don't really care what order they're executed in ... And, the nature of these observer-ish use cases is that you sometimes need pre-observers, and sometimes you need post-observers.
This is by far the best explanation I've seen so far of the rationale behind @before/@after. It should definitely go in the PEP.
Can you provide a similar justification for @around? Including why it should go around everything else rather than between the @before/@afters and the normal method.
Also, why have three things (@before/@after/@around) instead of just one thing (@around with a next-method call).
-- Greg
- Previous message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Next message: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]