PEP 318: Can't we all just get along?

Dan Sommers me at
Wed Aug 18 13:30:05 CEST 2004

On Tue, 17 Aug 2004 21:13:47 -0400,
Paul Morrow <pm_mon at> wrote:

> First though, I still believe that we should exploit existing
> conventions (recommended coding practices) as a way of getting 'free'
> declarations for class, static, and instance methods (e.g. methods
> whose first param is 'self' are instance methods, etc.). That feels
> very pythonic to me, just as we use naming conventions to distinguish
> public, private, and semi-private methods.

I don't understand how assigning semantic significance to a "recommended
coding practice" is Pythonic.

In the face of ambiguity, refuse to guess.

Explicit is better than implicit.

I think that the idea that started this thread is just right:

    def decorator function( arguments ): pass

is exactly equivalent to

    def function( arguments ): pass
    decorator( function )

Note that:

    - the decorator is right next to the function name
    - the decorator is outside the code of the function
    - there are no new keywords or punctuation
    - it's dynamic, flexible, and extensible

It's also abusable, but that's the nature of a language as dynamic as


Dan Sommers
Never play leapfrog with a unicorn.

More information about the Python-list mailing list