Dear all,
I am a bit stuck in a small project, trying to quit a PyGTK program.
Here are some relevant snippets:
def init_gui (self) :
self.window = gtk.Window (gtk.WINDOW_TOPLEVEL)
self.window.connect ("delete_event", self.
Dear tutors,
I have the following code snippet:
class N (object) :
def __init__ (self, d={}) :
self.d = d
n1 = N ()
n1.d['a'] = 1
n2 = N ()
n2.d['a'] = 2
print n1.d['a']
print n2.d['a']
I assumed that on each call of the __init__ without a dictionary
p
? The funny thing is, when I
put these things into an array of length, say, a million, it turns out that
class A eats about 184 bytes per instantiation, and class B a lot less
(sic!): plm 50 bytes. How come?
Best,
Bart.
--
Bart Cramer
Dudweilerstrasse 31
66111 Saarbrucken, Germany
0049 1577 680