J2 proposal: keyword

Dan Sommers me at privacy.net
Mon Aug 23 09:12:53 EDT 2004


On Mon, 23 Aug 2004 01:36:31 -0700,
"David Pokorny" <davebrok at soda.csua.berkeley.edu> wrote:

> There must be some cognitive-visual thingamajig going on here because I find

> using:
>     staticmethod synchronized memoize
> def bar(foo):
>     "upends the established order of metasyntactic keywords"
>     pass

> much more readable than

> @staticmethod synchronized memoize
> def bar(foo):
>     "upends the established order of metasyntactic keywords"
>     pass

> [I think it has something to do with the traffic jam at the left margin.]

I agree.  That traffic jam seems to promote staticmethod to the sole
decorator, and demote synchronized and memoize to sub-decorators of
staticmethod.

IMO, simply adding a space after the pie puts all three decorators "at
the same level":

    @ staticmethod synchronized memoize

That said, I'd prefer a keyword and a colon over that pie-thingy any
day.

Regards,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
Never play leapfrog with a unicorn.



More information about the Python-list mailing list