[Zope3-checkins] Re: SVN: Zope3/branches/ajung-tarek-request-publication-branch/src/zope/app/publication/interfaces.py new marker interfaces for methods and mimetypes

Philipp von Weitershausen philipp at weitershausen.de
Thu Oct 6 22:01:07 EDT 2005


Andreas Jung wrote:
> Log message for revision 38791:
>   new marker interfaces  for methods and mimetypes
>   
> 
[snip]
> +class IRequestPublicationFactory(interface.Interface):
> +    """ request-publication factory """
> +
> +    def canHandle(environment):
> +        """ returns True if it can handle the request,
> +            otherwise False. 'environment' can be used by the factory 
> +            to make a decision based on the HTTP headers.
> +        """
> +
> +    def getRequestPublication():
> +        """ returns a tuple (request, publication) """

Since this is a factory, wouldn't it be nicer to name this last method
__call__? At least when I think of a factory, I expect a callable that
returns stuff when I call it...

Philipp


More information about the Zope3-Checkins mailing list