Assignment not the same as defining?

Dale Strickland-Clark dale at riverhall.NOSPAMco.uk
Wed Oct 3 07:35:58 EDT 2001


A solution I thought I had to using __setattr__ doesn't seem to work.

class wibble:
	def __init__(self):
		<init code>
		self.__setattr__ = self.set

	def set(self, attr, value):
		<assignment code>

My late bound __setattr__ is never called.

I've clearly misunderstood something fundamental here. What am I doing
wrong?

Thanks
--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list