On Sep 20, 10:08 pm, Konstantinos Pachopoulos <[EMAIL PROTECTED]>
wrote:
>
> The __str__ method of "list" doesn't seem to call the __str__ method of
> the objects....
> ie, __str__ is not equicalent to the Java toString() method... Anyway,
> how can i fix this?

For whatever reason, __str__ of list calls repr rather than str on
its elements.

You can fix your code by adding __repr__ in your class:

Class CmterIDCmts:
    def __init__ ...
    def __str__ ...

    __repr__ = __str__

--
Paul Hankin

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to