This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients fdrake, iritkatriel, palakjha
Date 2020-08-12.16:37:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597250268.06.0.194561017762.issue39994@roundup.psfhosted.org>
In-reply-to
Content
This change makes a difference in semantics (perhaps a good one) in this case:

import pprint

class MyDict(dict):
    def __repr__(self):
        return 'I do my own thing'*50

if __name__ == '__main__':
    d=MyDict()
    for i in range(50):
        d['a%s'%i] = i

    pprint.pprint(d)


Before the change MyDict.__repr__ is ignored and the dict contents are printed. After the change it prints "I do my own thing" 50 times.
History
Date User Action Args
2020-08-12 16:37:48iritkatrielsetrecipients: + iritkatriel, fdrake, palakjha
2020-08-12 16:37:48iritkatrielsetmessageid: <1597250268.06.0.194561017762.issue39994@roundup.psfhosted.org>
2020-08-12 16:37:48iritkatriellinkissue39994 messages
2020-08-12 16:37:48iritkatrielcreate