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

Albertas Agejevas alga at pov.lt
Fri Jul 29 13:50:14 EDT 2005


On Fri, Jul 29, 2005 at 09:12:14AM -0400, Benji York wrote:
> 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.)

If you can, you make repr to tell you how to make and identical
object.  For example:

  >>> import datetime
  >>> datetime.datetime.now()
  datetime.datetime(2005, 7, 29, 20, 48, 32, 346507)
  >>> from sets import Set
  >>> Set([1,2,3])
  Set([1, 2, 3])

If you can't do that, you use angle brackets and an address:

  >>> object()
  <object object at 0xb7e71438>

Albertas


More information about the Zope3-dev mailing list