GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — [WIP] bpo-1635741: Port _collections module to multiphase initialization. by corona10 · Pull Request #19071 · python/cpython Conversation
|
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@vstinner I'd like to create a new helper function for this.
This logic can be reused.
https://github.com/python/cpython/blob/514c469719f149e1722a91a9d0c63bf89dfefb2a/Modules/itertoolsmodule.c#L4733L4747
What do you think?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do you mean combine PyType_Ready + _PyType_Name + PyModule_AddObject? Yeah, maybe it's worth it, but I would prefer to add it once this PR lands.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
58e7344 to
fb35d81
Compare
| &PyODict_Type, | ||
| &dequeiter_type, | ||
| &dequereviter_type, | ||
| &tuplegetter_type, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Either you use Py_ARRAY_COUNT() to get the list length, or you need to add a NULL terminator. Currently, you rely on an undefined behavior.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FWIW, some comments in https://github.com/python/cpython/pull/18066/files |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.