[Zope3-dev] interface conventions: default=_RAISE_ERROR

Barry A. Warsaw barry@zope.com
Wed, 15 May 2002 14:37:58 -0400


>>>>> "JF" == Jim Fulton <jim@zope.com> writes:

    >> 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?

    JF> Pretty clear, but too verbose and too inefficient. I'd much
    JF> rather have a different method that I could call.

Less efficient than catching an exception? ;)

-Barry