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-August/047324.html below:

[Python-Dev] Re: Decorators: vertical bar syntax

[Python-Dev] Re: Decorators: vertical bar syntax [Python-Dev] Re: Decorators: vertical bar syntaxAndrew Koenig ark-mlist at att.net
Sun Aug 8 02:03:45 CEST 2004
> > def foo():
> >    | classmethod
> >    | accepts(int,int)
> >    | returns(float)
> >
> 
> 
> Thats it!  I love it.

I like the following variation even better:

	def foo() |
		classmethod |
		accepts(int, int) |
		returns(float):

Alternatively,

	def foo() | classmethod | accepts(int, int) | returns(float):

Yes, I understand that the first of these would require allowing a newline
after the | without ending the statement.  If it were up to me, I would
allow a newline to follow any operator, but if that's too radical, then
allowing newlines between the def and the following : would be fine.

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