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

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Jul 29 15:40:14 EDT 2005


On Friday 29 July 2005 13:50, Albertas Agejevas wrote:
> 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>

Nice convention. I keep that in mind.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list