eval(repr(object)) hardly ever works
matt at tplus1.com
Wed Sep 13 17:02:57 CEST 2006
On Wed 13 Sep 2006 10:38:03 AM EDT, Steve Holden wrote:
> That's intentional. Would you have it return the code of all the methods
> when you take the repr() of a class?
I don't think that would be required. Couldn't you return a string with
a call to the constructor inside? That's what sets.Set seems to do:
In : from sets import Set
In : s = Set()
In : s.add('baloney')
In : repr(s)
In : eval(repr(s))
PS: I read your python web programming book a few years ago.
A better way of running series of SAS programs:
More information about the Python-list