Message250544
| Author |
JelleZijlstra |
| Recipients |
JelleZijlstra, barry, eric.smith, martin.panter, python-dev, yselivanov |
| Date |
2015年09月13日.00:15:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1442103337.03.0.215942560131.issue24965@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Is this behavior intentional?
>>> str = len
>>> x = 'foo'
>>> f'{x!s}'
'3'
>>> '{!s}'.format(x)
'foo'
Or similarly:
>>> import builtins
>>> del builtins.repr
>>> f'{x!r}'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'repr' is not defined |
|