Lawrence Oluyede wrote:
>>   That was my first thought as well.  Unfortunately a quick test shows
>> that class Foo(): creates an old style class instead :(
> 
> I think that's because until it'll be safe to break things we will
> stick with classic by default...

But in this case nothing will be broken, since the () syntax was 
formerly not allowed, so it won't appear in any existing code. So it 
would have been a good opportunity to shift over to increased usage 
new-style classes without breaking anything.

Thus, 'class Foo:' would create a classic class, but 'class Foo():' 
would create a new-style class.

However, once it's released as 2.5 that will no longer be the case, as 
people might start to use () to indicate a classic class. Oh well.

-- Talin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to