PEP 7 : don't allow MSVC extensions #758
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@erikjanss In my interpretation, this is already implied as the PEP mentions ANSI/ISO standard C (though since the list of C99 features was added, it became a little less clear). |
|
@encukou Up to now I only found one (I have not yet been able to go through all files though), Modules/socketmodule.c line 562 :
uses __pragma, which appears to be a MSVC extension : |
|
Can you file a CPython pull request to properly conditionalize that? I think it will be useful to first have a PR discussion on this particular case, and then to clarify the PEP based on the PR discussion. |
|
I made a PR for this : The associated issue is 34581 |
PEP 7 has this sentence :
I would propose to change this to :
Reason : using MSVC extensions in the C-code makes is harder to reuse the code or do experimental work on the code using different toolchains or make the code portable to other toolchains, which could be a long term disadvantage.
An exemption could be made for the
PC/pyconfig.hfile as this file is more or less MSVC specific.The text was updated successfully, but these errors were encountered: