watching mutables?

Mark McEahern marklists at mceahern.com
Fri Sep 27 10:34:55 EDT 2002


> Subject: watching mutables?

class Watched(list):

  def append(self, element):
    print "appending %s" % element
    list.append(self, element)

l = Watched()
l.append(1)

// m




More information about the Python-list mailing list