FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-1635741: Port _csv to multi-phase init by encukou · Pull Request #22838 · python/cpython · GitHub

/ cpython Public

bpo-1635741: Port _csv to multi-phase init - #22838

Closed
encukou wants to merge 2 commits into
python:masterfrom
encukou:pep-573-walker-and-csv
Closed

bpo-1635741: Port _csv to multi-phase init#22838
encukou wants to merge 2 commits into
python:masterfrom
encukou:pep-573-walker-and-csv

Conversation

encukou commented Oct 20, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

This PR depends on #22835 and shows how the new _PyType_GetModuleByDef can be used. I would love these to go in as two separate commits.

https://bugs.python.org/issue1635741

encukou and others added 2 commits October 20, 2020 22:45
Uses code from: python#16078

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Comment thread Objects/typeobject.c
assert(PyType_Check(type));
assert(type->tp_mro);
int i;
for (i = 0; i < PyTuple_GET_SIZE(type->tp_mro); i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it's better to call PyTuple_GET_SIZE before the for loop to only call it once.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's a macro for direct field access, so it doesn't really matter.

encukou requested review from a team, vsajip and warsaw as code owners November 10, 2020 13:53
encukou changed the base branch from 3.9 to master November 10, 2020 13:53

encukou commented Nov 10, 2020

Copy link
Copy Markdown
Member Author

Apologies for the mass review requests. I'll open a new PR.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL