You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> a = 'alpha'
>>> b = 'bravo'
>>> d = 'delta'
>>> origin = '{} {} charlie {}'
>>> new = origin.format(a, b, d)
>>> print(new)
alpha bravo charlie delta
>>> print(origin)
{} {} charlie {}
>>>
gpython
>>> a = 'alpha'
>>> b = 'bravo'
>>> d = 'delta'
>>> origin = '{} {} charlie {}'
>>> new = origin.format(a, b, d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FIXME line of source goes here
AttributeError: "'str' has no attribute 'format'"
>>> print(new)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FIXME line of source goes here
NameError: "name 'new' is not defined"
>>> print(origin)
{} {} charlie {}
>>>
Activity
ncw commentedon Oct 8, 2019
Yes gpython needs this :-)
The specification of the format language is here so it is reasonably complicated to do completely.
DoDaek commentedon Oct 11, 2019
It may take some time, but I'll work it out.
Thanks for your information 👍
drew-512 commentedon Feb 16, 2022
Waiting on response from @slongfield
slongfield/pyfmt#15