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

Andreas Jung andreas at andreas-jung.com
Thu Oct 6 22:27:39 EDT 2005


Sounds reasonable...thanks for hint.
-aj

--On 7. Oktober 2005 10:01:07 +0800 Philipp von Weitershausen 
<philipp at weitershausen.de> wrote:

> 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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-checkins/attachments/20051007/5a344841/attachment-0001.bin


More information about the Zope3-Checkins mailing list