A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045468.html below:

[Python-Dev] functions decorators in 2.4?

[Python-Dev] functions decorators in 2.4? [Python-Dev] functions decorators in 2.4?Brett Cannon bac at OCF.Berkeley.EDU
Sat Jun 19 01:19:14 EDT 2004
Martin Zarate wrote:

> Why not use the underused "as" keyword for decorators?
> 
> That is,
> 
> def foo(bar, baz) as StaticMethod:
> 
> It would be very handy for classes, as I've worked with custom class 
> structures (such as an overcomplicated interface-based structure that I was 
> experimenting with) that it would be useful for.
> 

I think Guido has said no more syntax ideas on this one.  It's either 
before the 'def', after the argument list, or like Java 1.5 .

> Are there plans to extend this to fully custom blocks and statements like in 
> Ruby?  Or will it only be for modified def and class statements?
> 

Since Python does not have blocks like Ruby this is a moot point at the 
moment.  If Python grows blocks like Ruby it can be determined then.  As 
it stands now it is only meant for functions and methods.

-Brett

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