Re: Strange Class definition

2019-09-16 Thread Peter Otten
ast wrote: > Hello > > Following syntax doesn't generate any errors: > > >>> foo=0 > >>> Class Foo: > foo > > But class Foo seems empty > > Is it equivalent to ? > > >>> class Foo: > pass The resulting class is equivalent, but the expression `foo` is actually evaluated d

Strange Class definition

2019-09-16 Thread ast
Hello Following syntax doesn't generate any errors: >>> foo=0 >>> Class Foo: foo But class Foo seems empty Is it equivalent to ? >>> class Foo: pass -- https://mail.python.org/mailman/listinfo/python-list