[Zope-dev] Python 2.6: 'with' in Interfaces

Marius Gedminas marius at gedmin.as
Wed Oct 8 01:42:42 EDT 2008


On Wed, Oct 08, 2008 at 12:35:39AM -0300, Sidnei da Silva wrote:
> Trying to run some tests with Python 2.6 I stumbled on a problem that
> I need help with: an interface that has an attribute named 'with'.
> 
> The interface in question is defined in zope.app.component.back35:
> 
> class IAdapterRegistration(IComponentRegistration):
> ...
>     with = schema.Tuple(
>         title = _("With interfaces"),
> ...
> 
> Any suggestions on how to fix this one?

The backwards-compatibility interfaces are supposed to expire after 3
releases (or was it years?), maybe we can simply remove this one?

If BBB weren't a consideration, you could rename this attribute to
with_, as that seems to be the current convention for names that are
also keywords (e.g. ZCML directives that have a 'class' attribute name
it 'class_' in the corresponding interface).

Marius Gedminas
-- 
H.323 has much in common with other ITU-T standards - it features a complex
binary wire protocol, a nightmarish implementation, and a bulk that can be used
to fell medium-to-large predatory animals.
        -- Anthony Baxter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20081007/a210f10f/attachment.bin 


More information about the Zope-Dev mailing list