Re: implementing zope.component 4.0

Martijn Faassen <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.