[Zope3-dev] Why z.a.appsetup.bootstrap function do not return the
	actual object
    Florian Lindner 
    mailinglists at xgm.de
       
    Wed Mar  8 08:57:37 EST 2006
    
    
  
Hello,
I'm currently playning with the functions from zope.app.appsetup.bootstrap and 
I'm wondering why the functions that create objects (addConfigureUtility, 
addUtility, configureUtility, ensureObject, ensureUtility) do return the name 
of the object added (or None) and not the object itself. What is the reason 
for that?
IMO in most cases you add a Utility you want to change some attributes of it 
afterwards. In order to do that you need the object instance. To get it from 
the name you have to perform a getUtility call. If the functions above would 
return the object you could omit the getUtility.
What do you think about that?
Florian
    
    
More information about the Zope3-dev
mailing list