Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Phase JSON Initialization #30805

Merged
merged 1 commit into from
Jan 8, 2020
Merged

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Jan 8, 2020

Feature in Python 3.5 that should simplify instantiation of the JSON module and make it more "pythonic"

https://docs.python.org/3/c-api/module.html?highlight=multi%20phase#multi-phase-initialization
https://www.python.org/dev/peps/pep-0489/

Also removed a version string from within the extension, as I don't see where that is useful

NULL, /* m_clear */
NULL /* m_free */
static PyModuleDef moduledef = {
.m_base = PyModuleDef_HEAD_INIT,
Copy link
Member Author

Choose a reason for hiding this comment

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

Designated initializers are C99 standard and supported by MS since Visual Studio 2013. Orthogoanl here but I figured made things more readable and less verbose

@WillAyd WillAyd added the Clean label Jan 8, 2020
@jreback jreback added this to the 1.0 milestone Jan 8, 2020
@jreback jreback added the IO JSON read_json, to_json, json_normalize label Jan 8, 2020
@jreback jreback merged commit 9720442 into pandas-dev:master Jan 8, 2020
@jreback
Copy link
Contributor

jreback commented Jan 8, 2020

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants