Re: [Python] Tutte le specifiche delle fstrings.

2022-05-26 Per discussione Andrea D'Amore
On Thu, 26 May 2022 at 14:24, Gabriele Battaglia wrote: > Sto guardando la documentazione Ma la trovo difficile, da > comprendere, non per i concetti ma mi pare ...dispersiva. Sì. Vedi https://fstring.help . > f"{valore:alling fill tipo} name = "Ciccio" f"{name:-^10}" -- Andrea D

Re: [Python] File not found.

2022-05-26 Per discussione Yuri
Penso tu debba fare: open(fn, "rt", encoding='utf-8') Il 26/05/22 16:47, Gabriele Battaglia ha scritto: Reply to Yuri's message, wrote on 26/05/2022 at 16:22: Ciao,  ci sarà un altro errore che fa scattare l'except. Prova ad eliminare il try/except ed esegui solo il blocco nel try, dovrest

Re: [Python] File not found.

2022-05-26 Per discussione Yuri
Ciao,  ci sarà un altro errore che fa scattare l'except. Prova ad eliminare il try/except ed esegui solo il blocco nel try, dovresti vedere l'errore.  Solitamente conviene scrivere l'eccezione in maniera esplicita:  except OSError:  Se non è un errore sul file, allora vedrai il traceback e l

Re: [Python] Tutte le specifiche delle fstrings.

2022-05-26 Per discussione Yuri
Nella parte lessicale: https://docs.python.org/3/reference/lexical_analysis.html#f-strings "The format specifier mini-language is the same as that used by the str.format() method.". Quindi trovi le specifiche qui: https://docs.python.org/3/library/string.html#formatstrings dove trovi: "|'^'

Re: [Python] Tutte le specifiche delle fstrings.

2022-05-26 Per discussione Francesco Pischedda
Vedi se questo puó essere di aiuto https://docs.python.org/3/library/string.html#formatspec Il giorno gio 26 mag 2022 alle ore 12:21 Gabriele Battaglia < iz4...@libero.it> ha scritto: > Ciao. > > Cerco la documentazione completa sulle f-strings, mi pare sia la PEP458? > Non sono sicuro. In rete t