[Zope-dev] Coding style clarifications

Joachim König him at online.de
Fri Feb 20 07:48:15 EST 2009


Jim Fulton wrote:
> On Feb 19, 2009, at 4:07 PM, Shane Hathaway wrote:
>
>   
>> You're saying that:
>>
>>     import zope.interface.Interface
>>
>>     class IFoo(zope.interface.Interface):
>>         ...
>>
>> is better than:
>>
>>     from zope.interface import Interface
>>
>>     class IFoo(Interface):
>>         ...
>>     
>
> 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):

     ...

Joachim


More information about the Zope-Dev mailing list