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/2003-January/032503.html below:

[Python-Dev] Extended Function syntax

[Python-Dev] Extended Function syntax [Python-Dev] Extended Function syntaxGuido van Rossum guido@python.org
Wed, 29 Jan 2003 10:29:48 -0500
> However this could work:
> 
> class Foo(object):
>     myprop = property:
> 	"""A computed property on Foo objects."""
> 	def __get__(self):
> 	    return ...
> 	def __set__(self, value):
> 	    ...
> 	def __delete__(self):
> 	    ...
> 
> This would call property() with the results of parsing the indented block.
> Not sure yet this is a good idea, but it could have many other (possibly
> good, possibly harmful) uses.

Funny, I had a vision of something very similar this morning in the
shower. :-)

The problem is that this is a *very* radical change to the grammar,
and I'm not sure I can rigorously define how the switch from
"expression parsing mode" to "block parsing mode" should work.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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