Assignment not the same as defining?

Dale Strickland-Clark dale at
Wed Oct 3 13:35:58 CEST 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

Dale Strickland-Clark
Riverhall Systems Ltd

More information about the Python-list mailing list