Re: PEP Idea: Real private attribute

2021-08-31 Thread Mehrzad Saremi
ary using the target object as a key. > > On Sat, Aug 28, 2021 at 5:42 PM Mehrzad Saremi > wrote: > >> Python currently uses name mangling for double-underscore attributes. Name >> mangling is not an ideal method to avoid name conflicting. There are >> various normal programm

Re: PEP Idea: Real private attribute

2021-08-29 Thread Mehrzad Saremi
n if you want to implement self.__privs__[__class__, "foo"] in a parent class using __setattr__/__getattribute__ the __class__ value is unknown. On Mon, 30 Aug 2021 at 00:26, Chris Angelico wrote: > On Mon, Aug 30, 2021 at 5:49 AM Mehrzad Saremi > wrote: > > > > No, a cl

Re: PEP Idea: Real private attribute

2021-08-29 Thread Mehrzad Saremi
t when it could have been implemented in a much more cogent way. Best, [image: image.gif][image: image.gif] Mehrzad On Sun, 29 Aug 2021 at 02:18, Chris Angelico wrote: > On Sun, Aug 29, 2021 at 7:40 AM Mehrzad Saremi > wrote: > > > > Python currently uses name mangling fo

PEP Idea: Real private attribute

2021-08-28 Thread Mehrzad Saremi
privs__ over name mangling/double-underscores. While name mangling does not truly guarantee conflict resolution, __privs__ does. Please discuss the idea, let me know what you think about it, whether there are possible disadvantages, and if you think it will be approved as a PEP. Thanks, Mehrzad Saremi AI M.Sc. grad. from AUT -- https://mail.python.org/mailman/listinfo/python-list