[Zope3-dev] interface conventions: default=_RAISE_ERROR
Jim Fulton
jim@zope.com
Wed, 15 May 2002 14:00:06 -0400
Casey Duncan wrote:
>
> Maybe handling the default should be the applications responsibility. Explicit
> if you will:
>
> no_value = object()
> value = someob.get(key, no_value)
> if value is no_value:
> ...We got nothin'...
>
> A bit more verbose, but pretty clear I think, no?
Pretty clear, but too verbose and too inefficient. I'd much rather
have a different method that I could call.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org