Avoiding the __repr__ call or protecting an instance from evaluation URG. please

Fernando Rodríguez spamers at must.die
Sat Jan 27 13:10:07 EST 2001


Hi!

	I have a class whose __repr__ method returns a string. Whenever I pass
an instance of this class to a function, what the function gets is the result
of __repr__. Most of the time this is OK, but under certain circumstances I
also need to make sure that a function receives an instance of the class, and
the the string that __repr__ returns.

	How can I do this? O:-)

PS This is my __repr__ method:
def __repr__( self ):
        return ",v" + str(self.tag) +", "




//-----------------------------------------------
//	Fernando Rodriguez Romero
//
//	frr at mindless dot com
//------------------------------------------------



More information about the Python-list mailing list