[Zope3-dev] interface conventions: default=_RAISE_ERROR

Patrick K. O'Brien pobrien@orbtech.com
Wed, 15 May 2002 14:20:39 -0500


[Jim Fulton]
> 
> Maybe the default and no-default cases should be distinguished by
> the starting verb.  I think getXXX should be like dictionary get, 
> except that we should require a default value argument.
> 
> I'm not sure verb to use for the no default case.
> 
> Anybody got any ideas?

How about try?
 
> Maybe the no default case should ommit the verb, as in:
> 
>   getRequestDefaultViewName(object, request, default=None)
> 
>   requestDefaultViewName(object, request)

getRequestDefaultViewName(object, request, default=None)

tryRequestDefaultViewName(object, request)

---
Patrick K. O'Brien
Orbtech