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

[Python-Dev] Extended Function syntax

[Python-Dev] Extended Function syntax [Python-Dev] Extended Function syntaxArmin Rigo arigo@tunes.org
Sat, 1 Feb 2003 09:31:07 -0800 (PST)
Hello,

On Tue, Jan 28, 2003 at 05:44:26PM -0500, Guido van Rossum wrote:
> >     class Parrot(object):
> >         _count = 0
> >         class count(Property):
> >             """The count property."""
> >             def __get__(self):
> >                 return self._count
> >             def __set__(self, value):
> >                 self._count = value
> >             def __del__(self):
> >                 self._count = 0
> 
> These all abuse the class keyword for something that's definitely not
> a class.  That's a fatal flaw.

Too bad Python's metaclasses are powerful enough for doing all the kind of
things that a macro system could do without actually manipulating the syntax,
if it is to hear that actually doing so is fatally flawed :-(


Armin




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