[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 15 03:42:19 CEST 2007

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

Also, why have three things (@before/@after/@around)
instead of just one thing (@around with a next-method


More information about the Python-3000 mailing list