• Jelle Zijlstra's avatar
    fstrings: remove addressed TODOs · c6a07689
    Jelle Zijlstra authored
    Docstrings don't support f-strings in cpython, so they don't need to here either. The scanner
    seems to be working.
    
    Current status:
    - All but three of the tests from CPython's test_fstring pass. Two of the remaining ones rely
      on exec and the third relies on a runtime NameError that occurs at compile time in Cython. These
      tests still need to be added to the Cython test suite.
    - I'm not overly convinced that the refcounting is correct in the C code that's currently
      emitted.
    - There's some room for optimization, such as removing empty strings from JoinedStrNode,
      concatenating adjacent raw strings at compile time, and using _PyUnicodeWriter.
    - Currently the feature is available in both Python 2 and Python 3 mode. It mostly works in
      Python 2, except for the !a conversion char.
    c6a07689
Parsing.py 119 KB