Skip to content

__mro__ attribute change with getmro function in inspect module#22547

Closed
hakancelikdev wants to merge 1 commit intopython:mainfrom
hakancelikdev:inspect-mro
Closed

__mro__ attribute change with getmro function in inspect module#22547
hakancelikdev wants to merge 1 commit intopython:mainfrom
hakancelikdev:inspect-mro

Conversation

@hakancelikdev
Copy link
Contributor

No description provided.

@hakancelikdev
Copy link
Contributor Author

hakancelikdev commented Oct 4, 2020

Can someone add "skip issue" and "skip news" label tags?

@hakancelikdev hakancelikdev changed the title __mro__ attribute change with mro function in inspect module __mro__ attribute change with getmro function in inspect module Oct 5, 2020
Copy link

@hadialqattan hadialqattan left a comment

Choose a reason for hiding this comment

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

A good catch!

Tested manually using the Python REPL on Ubuntu 20.04.1 LTS (Focal Fossa).

@iritkatriel
Copy link
Member

@hakancelik96 can you explain why you are proposing this change?

@hakancelikdev
Copy link
Contributor Author

@hakancelik96 can you explain why you are proposing this change?

I wanted to make this change to improve readability, it seemed like a better idea to use an already existing method, but now I think that there should be a lot of code in CPython like this, and updating each one like this might be unnecessary.

In addition, I wanted to practice myself by contributing to CPython the times when I made this change and move towards better contributions.

@iritkatriel
Copy link
Member

@hakancelik96 I understand, and I am glad that you are interested in contributing to Python.

Readability is a matter of opinion, and this is why the dev guide advises against cosmetic-only changes. There is also a cost to code-churn in terms of long commit histories, potential for errors slipping in, etc.

Have a look at this blog post for some suggestions on contributing to Python. See you soon on another PR!

@hakancelikdev hakancelikdev deleted the inspect-mro branch May 22, 2021 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants