repr question

Monty (monty@tbyte.com)
Thu, 14 Jul 1994 19:30:58 GMT

A typical repr from the demo is:

class complex:
..
def __repr__(self):
return 'complex' + `self.re, self.im`

To be able to create the object from it's repr implies that instead of
"import complex" you need to do "from complex import *". Is that pretty
much standard practice, or would it make sense for repr to reference it's
module?

def __repr__(self):
return 'complex.complex' + `self.re, self.im`