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-February/042729.html below:

[Python-Dev] Re: new syntax for wrapping (PEP 318)

[Python-Dev] Re: new syntax for wrapping (PEP 318) [Python-Dev] Re: new syntax for wrapping (PEP 318)Mark Russell marktrussell at btopenworld.com
Wed Feb 25 18:33:40 EST 2004
On Wed, 2004-02-25 at 22:37, Skip Montanaro wrote:
> I'll add another data point.  Quixote'd PTL uses almost this exact syntax to
> distinguish between PTL functions/methods which return HTML or plain text.
> The only difference is that it places the annotation before the argument
> list:
> 
>     def head [html] (title):

I think the reason why this (and the proposed method annotation syntax)
is readable is that it reads as a parenthetical note [i.e. something
that is intended to convey a bit of extra information].

It would be interesting to show

	def foo(self) [classmethod]:

to a relative python beginner and ask them the guess at the meaning.  My
hunch is that they would assume that "[classmethod]" modifies the
meaning of the function defintion in some way.  The curious could then
look up classmethod in the manual, where they would presumably find a
note about the [] syntax.

Mark Russell

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