AW: [Zope-dev] coding style: using zapi recommended?

Roger Ineichen dev at projekt01.ch
Mon Apr 14 07:29:51 EDT 2008


Hi yuppie

> Betreff: [Zope-dev] coding style: using zapi recommended?

[...]

> In the Five version
> 
>    from zope.app import zapi
>    factory = zapi.getUtility(IFactory, type_name)
> 
> was replaced by
> 
>    import zope.component
>    factory = zope.component.getUtility(IFactory, type_name)

Use zope.component and skip dependency to zope.app 
by using "from zope.app import zapi".

Feel free to replace zapi everywhere in all packages
if you change something.

Regards
Roger Ienichen



More information about the Zope-Dev mailing list