Ken Kundert <[email protected]> writes:
> Lele,
> I'm afraid I was unclear. The ... in the code snippet was intended
> to imply that these lines were appended to the end of the original code,
> where d was defined.
Ok, but then I get a different behaviour:
Python 3.6.5 (default, May 11 2018, 13:30:17)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> k=1
>>> v=2
>>> d=3
>>> print(f'Email: {d:{{k}} {{v}}}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier
Which Python version are you using?
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
[email protected] | -- Fortunato Depero, 1929.
--
https://mail.python.org/mailman/listinfo/python-list