Visitar URL original
f-string with bool expression and if-expression inside · Issue #1099 · RustPython/RustPython · GitHub
Skip to content

f-string with bool expression and if-expression inside #1099

Description

@mkurnikov

All these fail to parse

f'{True or True}'
f'{1 == 1}'
f'{"0" if True else "1"}'

Activity

  1. added
    C-compatA discrepancy between RustPython and CPython
    on Jul 3, 2019
  2. windelbouwman commented on Jul 6, 2019

    @windelbouwman
    Contributor

    This is strange. Any clue why this is the case?

  3. windelbouwman commented on Jul 6, 2019

    @windelbouwman
    Contributor

    Pull request #1112 improves diagnostics on f-strings a bit. That might help.

  4. added a commit that references this issue on Jul 7, 2019
    7e138ec
  5. windelbouwman commented on Jul 7, 2019

    @windelbouwman
    Contributor

    I found the reason, and fixed it. Thanks for reporting!

  6. windelbouwman commented on Jul 7, 2019

    @windelbouwman
    Contributor

    Will be fixed when #1115 is merged. Please take a look at the change if you wish.

  7. added a commit that references this issue on Jul 7, 2019
    18bb563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-compatA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions