nary 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 pro
I mean 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:
> >
> >
language that it doesn't really fit 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:
> >
> >
nd can be dictionary keys.
Personally, I do not see any disadvantage of using __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