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

Raymond Hettinger python at rcn.com
Sun Feb 20 04:46:40 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. 

Yea!


Raymond


More information about the Python-Dev mailing list