[EMAIL PROTECTED] wrote:
l = Undoable(list)
l = [1, 2, 3]
You just rebound l, so it no longer refers to an Undoable, it
refers to a list. This design won't work, you need something
more like:
l = Undoable([1, 2, 3])
There were a few other pitfalls in your design... Here,
try something like this ins
>[EMAIL PROTECTED] wrote:
>> I have run into some cases where I would like to run a class method
>> anytime any class method is invoked.
>
>Perhaps you want __getattribute__ on a new-style class?
>--
>Michael Hoffman
Perhaps I do. The docs say that __getattribute__ is called on all
attribute refer
[EMAIL PROTECTED] wrote:
I have run into some cases where I would like to run a class method
anytime any class method is invoked.
Perhaps you want __getattribute__ on a new-style class?
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
I have run into some cases where I would like to run a class method
anytime any class method is invoked.
That is, if I write
x.foo
then it will be the same as writing
x.bar
x.foo
for any method in class x (with the possible exception of 'bar').
The first few times I wanted to print out a data st