Closed
Description
The outputs of this script are different between rustpython and cpython
import _string
format_string = "{title[:220]}"
for literal_text, field_name, format_spec, conv in _string.formatter_parser(
format_string
):
print(
f"literal_text: '{literal_text}' field_name: '{field_name}, format_spec: '{format_spec}, conv: {conv}'"
)
cpython prints correctly:
literal_text: '' field_name: 'title[:220], format_spec: ', conv: None'
while rustpython prints:
literal_text: '' field_name: 'title[, format_spec: '220], conv: None'
this seems to cause issues when using gallery_dl as this is used for formatting file names in some extractors