-
Notifications
You must be signed in to change notification settings - Fork 6
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
Const correctness #38
Comments
I really tried to use
The I also wanted to use So far, in C, I was only convinced by C++ has a way better API regarding to "const". |
Historical note: One of the largest pain points in making a huge codebase supporting Python 3.6 compatible with 3.7 prior to upgrading was that So I'm not in favor of adding |
As I explained previously, I suggest to abandon this idea and close the issue. |
So the decision for new API is to use |
In short yes, |
The C API almost never uses
const
, so it's usually simply unused in user code too.Future/alternative implementations might need to modify refcounts (or similar) in arguments that are now
const
, and removingconst
from a signature is an API break.Is it worth it to use
const
in new API?See also: python/cpython#91768
The text was updated successfully, but these errors were encountered: