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
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com