[Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/wfmc/process.py Developed nicer, human-readable representations of several classes. Hope

Benji York benji at zope.com
Fri Jul 29 09:12:14 EDT 2005


Stephan Richter wrote:
> Log message for revision 37434:
>   Developed nicer, human-readable representations of several classes. Hope 
>   you like it! :-)

> +    def __repr__(self):
> +        return "<ActivityDefinition '%s'>" %self.__name__

> +    def __repr__(self):
> +        return "TransitionDefinition(from='%s', to='%s')" %(self.from_, self.to)

> +    def __repr__(self):
> +        input = ', '.join([param.__name__ for param in self.parameters
> +                           if param.input == True])
> +        output = ', '.join([param.__name__ for param in self.parameters
> +                           if param.output == True])        
> +        return "<Application '%s': (%s) --> (%s)>" %(self.__name__,
> +                                                     input, output)

> +    def __repr__(self):
> +        return "Participant('%s')" %self.__name__

What's the reasoning for using angle brackets on some, and not on the 
others?  (I personally like angle brackets better, to be consistent with 
Python.)
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-dev mailing list