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

[Python-Dev] Requesting that a class be a new-style class

[Python-Dev] Requesting that a class be a new-style class [Python-Dev] Requesting that a class be a new-style classMichael Walter michael.walter at gmail.com
Sat Feb 19 09:12:50 CET 2005
But... only as an additional option, not as a replacement, right?

Michael


On Sat, 19 Feb 2005 03:01:14 -0500, Raymond Hettinger <python at rcn.com> wrote:
> > > This is something I've typed way too many times:
> > >
> > > Py> class C():
> > >   File "<stdin>", line 1
> > >     class C():
> > >             ^
> > > SyntaxError: invalid syntax
> > >
> > > It's the asymmetry with functions that gets to me - defining a
> > > function with no arguments still requires parentheses in the
> > > definition statement, but defining a class with no bases requires the
> > > parentheses to be omitted.
> >
> > Seconded.  It's always irked me enough that it's the only ``apology''
> > for Python syntax you'll see in the Nutshell -- top of p. 71, "The
> > syntax of the class statement has a small, tricky difference from that
> > of the def statement" etc.
> 
> +1  For me, this would come-up when experimenting with mixins.  Adding and removing a mixin usually entailed a corresponding
> change to the parentheses.
> 
> 
> Raymond
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/michael.walter%40gmail.com
>
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