"Mac Ryan" <quasipe...@gmail.com> wrote
above function. In fact, as I have the need to access the object both
individually and with the dispatcher, I am doing something like this
every time I instantiate a new object:
<code>
mycontent = ContentA()
contents.append(mycontent)
</code>
...but although I "feel" this is silly, I can't imagine how to get it
better (i.e. a single call that will make available the object with his
unique name and append it to the list of contents.
There is no simpler solution without changing the class.
If you can do that you could pass the container to the constructor
and get the class to add itself to the container....
HTH,
Alan G.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor