Skip to content

f strings don't support slices #4780

@Gigahawk

Description

@Gigahawk

Firmware

Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather STM32F405 Express with STM32F405RG

Code/REPL

arr = [1, 2, 3]
print(arr)  # [1, 2, 3]
print(arr[1:])  # [2, 3]
print(f"asdf{arr}")  # asdf[1, 2, 3]
print(f"asdf{arr[1:]}")  # should be asdf[2, 3]

Behavior

Traceback (most recent call last):
  File "<stdin>", line 1
SyntaxError: invalid syntax

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions