Paul Winkler wrote:
On Thu, Nov 16, 2006 at 10:21:09AM +0100, Philipp von Weitershausen wrote:
How would I _really_ return None from an adapter?
You don't. You call the adaption with a default value (e.g. None) to cover for the "coudln't adapt" case:

  >>> 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')

Yes, thanks.

-- -- Professional Zope documentation and training
Zope3-dev mailing list

Reply via email to