On 9/16/06, Talin <talin at acm.org> wrote: > > 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. We didn't want there to suddenly be a way to make a new-style class that didn't explicitly subclass 'object'. -Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060916/f30361fe/attachment.htm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4