[Zope-Checkins] CVS: ZODB3/ZODB - StorageConfig.py:1.1 StorageTypes.py:1.1
Guido van Rossum
guido@python.org
Sat, 23 Nov 2002 02:40:22 -0500
> Cool!
You should thank Shane -- 99% of the work was lifted from DBTab.
> It would also be nice to have a "createStorageFactory" method
> which given a section object would return a callable which would
> create a storage. This would be useful for doing things (like
> setuid) before actually creating a storage (like possibly writing a
> file) during the larger scope of config file parsing.
That's what getStorageInfo() does. It returns a tuple (cls, dict)
that you can instantiate later by calling cls(**dict). If you
really want a callable without args, use a lambda. :-)
--Guido van Rossum (home page: http://www.python.org/~guido/)