[Zope-dev] Circular dependency hell.

Christian Theune ct at gocept.com
Tue Apr 20 15:47:39 EDT 2010


On 04/20/2010 09:24 PM, Jim Fulton wrote:
> On Tue, Apr 20, 2010 at 3:04 PM, Fred Drake<fdrake at gmail.com>  wrote:
>> On Tue, Apr 20, 2010 at 2:58 PM, Christian Theune<ct at gocept.com>  wrote:
>>> zope.testing uses the attribute '__bases__' to store the information what
>>> the base layers are. __*__ are supposedly Python internal attributes.
>>> Specifically __bases__ is known to be used to store information which base
>>> classes a class has.
>>
>> This sort of misdirection has, unfortunately, a long history in Zope 3
>> (and the various things that's become).  Witness __name__.  (There are
>> others, but most aren't *actually* used by Python implementations.)
>>
>> Removing existing __*__ name ("underware") usage is probably
>> untenable, but I hope we can avoid extending our foolishness.
>
> OK, let's stop new uses of __*__ names. We won't provide initializers
> for classes, or implement operations either.
>
> The use of protocols like __name__ and __bases__ is intended to
> conform to common usage in Python.
>
> Let's invent new names that are specific to our own frameworks.
>
> I can live with saying we shouldn't invent new __*__ names,
> even though I consider that a meta protocol.  I get annoyed at
> criticism for following standard protocols.

I don't know (or at least can't remember) all of the history of the 
discussion about that, but I wouldn't argue about following standard 
protocols.

I think the issue is with that it's not standard protocol the way we use 
it - at least I can't find our use of __bases__ documented in Python's 
documentation[1] about __bases__ and thus have a hard time saying we're 
following standard protocols.

Christian

[1] .. 
http://docs.python.org/library/stdtypes.html?highlight=__bases__#class.__bases__

-- 
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3830 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20100420/f0a0a6c4/attachment.bin 


More information about the Zope-Dev mailing list