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/051706.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 classGuido van Rossum gvanrossum at gmail.com
Sun Feb 20 02:08:09 CET 2005
> > 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.

It's fine to fix this in 2.5. I guess I can add this to my list of
early oopsies -- although to the very bottom. :-)

It's *not* fine to make C() mean C(object). (We already have enough
other ways to declaring new-style classes.)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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