problem with recursive container printing

"Mark Hahn" <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
I am working on a Prothon bug relating to printing out containers that are
recursive, i.e. contain themselves directly or indirectly, and I checked to
see how Python handles it.  I was dissapointed to see how wimpy Python is
when it comes to printing containers at all.  Instances are not first class
objects apparently:

    class K:
          def __str__(self):
                return 'hello world'

    k = K()
    print k         # hello world
    print [k]      # [<__main__.K instance at 0x008F9968>]

Prothon would print ['hello world'] of course.  Does anyone know why they do
this?  Do you think it is to solve the recursive printing problem that I am
chasing right now?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.