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

Avoid useless runtime type checks when coercing a None default argument to a Python type argument. #5652

Merged
merged 2 commits into from
Aug 26, 2023

Commits on Aug 26, 2023

  1. Avoid useless runtime type checks when coercing a None default argume…

    …nt to a Python type argument.
    
    For Python int (which we turn into a plain Python object type internally to avoid Py2 int/long issues), we previously generated a type check which made the None default argument much more complex than it was.
    
    Closes cython#5643
    scoder committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    541299b View commit details
    Browse the repository at this point in the history
  2. Fix an interesting case where we fail to convert a ctuple to a Python…

    … tuple on cascaded assignments (test_grammar.py, line 895) because we do not generate a (useless) PyTypeTestNode any more.
    
    Apparently, that type test is still required in order to trigger the Python conversion, which then renders the type test redundant.
    scoder committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    592c04a View commit details
    Browse the repository at this point in the history