[Zope-dev] implementing zope.component 4.0

Martijn Faassen faassen at startifact.com
Fri Nov 27 08:45:57 EST 2009


Baiju M wrote:
>> from zope.__future__ import new_adapter_lookup?
> 
> Let's leave how special names are created in Python to Python.
> We already have __parent__, __annotation__ etc.
> 
> What if Python brings a special name which we are using with
> a different semantics.

Python's not going to introduce a new keyword or __special__ method any 
time soon (especially given the recent moratorium on language changes), 
or break existing usages. I think a __future__ to import from would be 
pretty safe. Besides, hopefully soon enough we could remove all those 
imports again, as we're done upgrading.

> May be we can use special prefix for Zope's own special names,
> some thing like: _z__specialname__ .

We're just following the Python pattern here, the from __future__ import 
pattern.

I think:

   from zope.component.__future__ import new_lookup

would clearly signal even to a completely unaware Python programmer that 
something special is going on.

[Marius spelled it better than I did; no need to double underscore 
__new_lookup__]

Regards,

Martijn



More information about the Zope-Dev mailing list