[Tutor] it is about definitions

Kent Johnson kent37 at tds.net
Tue Jan 16 17:17:55 CET 2007


Andreas Kostyrka wrote:
> * emilia12 at mail.bg <emilia12 at mail.bg> [070116 15:19]:
>> is there a difference between:
>>
>> class foo:
>>
>> and
>>
>> class foo():
> This is a SyntaxError.

In Python 2.5 it is allowed and creates an old-style class, the same as 
if the parentheses are omitted.

Kent



More information about the Tutor mailing list