Paul Winkler wrote:
On Thu, Nov 16, 2006 at 10:21:09AM +0100, Philipp von Weitershausen wrote:
You don't. You call the adaption with a default value (e.g. None) to
cover for the "coudln't adapt" case:
How would I _really_ return None from an adapter?
>>> getAdapter('moo', DateTime, None)
That doesn't work, getAdapter() doesn't have a default arg.
I think what you meant is:
queryAdapter('moo', DateTime, default='xyz')
http://worldcookery.com -- Professional Zope documentation and training
Zope3-dev mailing list