[Python-Dev] Grammar change in classdef

Gustavo Carneiro gjcarneiro at gmail.com
Sat Sep 16 22:54:13 CEST 2006


On 9/16/06, Talin <talin at acm.org> wrote:
> Nick Coghlan wrote:
> > As for the reason: it makes it possible to use the same style for classes
> > without bases as is used for functions without arguments. Prior to this
> > change, there was a sharp break in the class syntax, such that if you got rid
> > of the last base class you had to get rid of the parentheses as well.
>
> Is the result a new-style or classic-style class? It would be nice if
> using the empty parens forced a new-style class...

  That was my first thought as well.  Unfortunately a quick test shows
that class Foo(): creates an old style class instead :(

-- 
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."


More information about the Python-Dev mailing list