[Zope-dev] Coding style clarifications

Andreas Jung lists at zopyx.com
Fri Feb 20 09:51:34 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20.02.2009 15:39 Uhr, Jim Fulton wrote:
> On Feb 20, 2009, at 7:48 AM, Joachim König wrote:
> ...
>>> 2. Depending on what code you might unearth, Interface could be  
>>> either  zope.interface.Interface, or the older version  
>>> Interface.Interface.   Package qualification makes this unambiguous.
>>>
>> if module qualification is enough and "from" discouraged one could  
>> as well write:
>>
>>  import zope.interface as interface
>>
>>  class IFoo(interface.Interface):
>>
>>   ...
> 
> 
> "as" is evil and should never be used except in the most extreme  
> circumstances, if there even are any that extreme.
> 
> We have recommended:
> 
>   from zope import interface, component
> 
> and then not having to type "zope.", as you suggest above.  I've come  
> to dislike this because:
> 
> - It doesn't buy that much, and
> 
> - It's an odd case that has to be recognized.
> 
>

I followed the whole thread with some amusement. There are too many
personal coding styles on the market which makes it impossible to
regulate all all and everything. At least this  discussion about
about how to write imports properly appears esoteric to me.

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkmew3YACgkQCJIWIbr9KYyjlgCdGFtjHDTCSywVjGjCIyhGnnGI
lGcAoM4V7EkwFBztQyM5TKF0zTAJDhBs
=zZIL
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20090220/7aafd5d2/attachment.vcf 


More information about the Zope-Dev mailing list