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 Antony.Lee
Recipients Antony.Lee
Date 2018-03-06.05:36:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520314612.17.0.467229070634.issue33007@psf.upfronthosting.co.za>
In-reply-to
Content
Consider the following example:

    import pickle

    class T:
        def __init__(self):
            self.attr = self.__foo

        def __foo(self):
            pass

    print(pickle.loads(pickle.dumps(T())))

This fails on 3.6 with `AttributeError: 'T' object has no attribute '__foo'` (i.e. there's a lookup on the unmangled name).  As a comparison, replacing `__foo` with `_foo` results in working code.
History
Date User Action Args
2018-03-06 05:36:52Antony.Leesetrecipients: + Antony.Lee
2018-03-06 05:36:52Antony.Leesetmessageid: <1520314612.17.0.467229070634.issue33007@psf.upfronthosting.co.za>
2018-03-06 05:36:52Antony.Leelinkissue33007 messages
2018-03-06 05:36:51Antony.Leecreate