A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-September/068797.html below:

[Python-Dev] Grammar change in classdef

[Python-Dev] Grammar change in classdef [Python-Dev] Grammar change in classdefNick Coghlan ncoghlan at gmail.com
Sun Sep 17 11:00:13 CEST 2006
Talin wrote:
> Nick Coghlan wrote:
>> As for the reason: it makes it possible to use the same style for classes 
>> without bases as is used for functions without arguments. Prior to this 
>> change, there was a sharp break in the class syntax, such that if you got rid 
>> of the last base class you had to get rid of the parentheses as well.
> 
> Is the result a new-style or classic-style class? It would be nice if 
> using the empty parens forced a new-style class...

This was considered & rejected by Guido as too subtle a distinction. So you 
still need to set __metaclass__=type (or inherit from such a class) to get a 
new-style class.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

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