Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Can't compile curly braces in format string

Aperta
#845 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
compilers

Direzione di ricerca

Reproduce the reported f-string expression in Transcrypt and compare its handling with Python's literal-brace behavior. Trace the compiler entry point for f-strings and brace escaping, then add coverage for the example; done means it compiles without aborting and produces the expected '{foo}' output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

IS: bug

This expression can't compile and results in an aborted file:

s = 'foo'
f'{{{s}}}'

In Python this results in literal curly braces around the formatted variable:

>>> s = 'foo'
>>> f'{{{s}}}'
'{foo}'

Of course, a workaround is pretty trivial, but I thought it was interesting.

Lingua principale
Python
Stelle
2.9k
Fork
218
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TranscryptOrg/Transcrypt

Tutte le issue di TranscryptOrg/Transcrypt

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.