Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Mariatta
Copy link
Member

@Mariatta Mariatta commented Feb 24, 2017

(cherry picked from commit abb3b8a)
(cherry picked from commit 365cb5b)

def __setattr__(self, attr, value):
# We consider all the subscripted genrics as proxies for original class
if attr.startswith('__') and attr.endswith('__'):
super(GenericMeta, self).__setattr__(attr, value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a small question, why not just using super().__setattr__(attr, value) but super(GenericMeta, self)? Isn't that equivalent at this case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle you are right. This is mostly for similarity with next case (also there is Python 2 backport of this module, so that sometimes I just write the same code for both)

@Mariatta Mariatta merged commit bc33cd4 into python:3.5 Feb 25, 2017
@Mariatta Mariatta deleted the bpo-28556-3.5 branch February 25, 2017 00:41
akruis added a commit to akruis/cpython that referenced this pull request Jun 13, 2021
A failure to unpickle a frame could cause a NULL pointer access when
deallocating the frame. This has been fixed.
jaraco pushed a commit that referenced this pull request Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants