Jabba Laci schrieb:
Hi,
I have a list that contains custom objects. When printing the list,
I'd like to have a readable result, i.e. I'd like to see the output of
the __str__ functions. See an example below. When I call "print li", I
would like to get "[3, 5]". How to do that?
Use __repr__ ins
Hi,
I have a list that contains custom objects. When printing the list,
I'd like to have a readable result, i.e. I'd like to see the output of
the __str__ functions. See an example below. When I call "print li", I
would like to get "[3, 5]". How to do that?
Thanks,
Laszlo
==
class MyNu