[Python-Dev] PEP 3000 and new style classes

Lisandro Dalcin dalcinl at gmail.com
Fri Sep 9 23:17:54 CEST 2005


On 9/9/05, holger krekel <hpk at trillke.net> wrote:
> >
> > It matters because "metaclass = type" is completely obscure. How would
> > any non-expert have a clue what it means?
> 
> How would this non-expert have a clue what
> "from __future__ import new_style_classes" means?
> 

That is the point!!! If I am a developer, I think is better to have a
__future__ statement for things that are planned to change in the
future. If you are a non-expert, you will google for new style
classes, and I think is far easier to understand what a new style
class is than metaclasses. How many non-expert knows about nested
scopes subjects introduced in Py2.1? it has a __future__ statement.

Additionaly, a __future__ statement can be easily removed when a new
Python release cames. We could simply use the script
Tools/scripts/cleanfuture.py to eliminate those __future__ imports
when Py3.0 is available. The same applies for generators in Py2.4 ...


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594


More information about the Python-Dev mailing list