class problem

Jorge Vargas jorge.vargas at gmail.com
Mon Aug 28 18:04:32 EDT 2006


On 8/28/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> Duncan Booth wrote:
>
> > Yes, the first one is a syntax error because you aren't allowed empty
> > parentheses in a class statement
>
> however,
>
> $ python
> Python 2.5c1 /.../
>  >>> class foo():
> ...     pass
> ...
>  >>> foo
> <class __main__.foo at 0x00A3D840>
>  >>>
>
> </F>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
D:\python>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class foo():
  File "<stdin>", line 1
    class foo():
              ^
SyntaxError: invalid syntax

seems like a feature/bug of 2.5, why your learning a language with a
beta version?



More information about the Python-list mailing list