A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-August/046677.html below:

[Python-Dev] 2.4a2, and @decorators

[Python-Dev] 2.4a2, and @decoratorsRaymond Hettinger python at rcn.com
Mon Aug 2 18:54:35 CEST 2004
> > The only real necessary restriction on the @ operator is that its
> > argument be callable and take a single argument. Many expressions
could
> > return a callable object. Why not let them? Is it really worth
having a
> > special case just to SyntaxError expressions that sometimes won't
result
> > in an appropriate callable?
> >
> > Things someone might want to do, ordered roughly from most
reasonable to
> > least reasonable ;)
> > @foo().bar()
> > @foo or bar
> > @mydecorators['foo']
> > @lambda f: foo(f) or bar(f)
> >
> > Why disallow these forms? It seems quite difficult, especially, to
> > explain why the first one does not, or should not, work.
> >
> > James
> >
> 
>    For what it's worth, I agree with James completely.
> 
>    Jp

I concur.


Raymond

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4