Message305263
PEP 3101 states that format strings may only use the "."(getattr) or the "[]" (getitem) operators to address either attributes or items of parameters.
Should a programmer attempt to, for example, call a function of a parameter as follows:
>>> d = datetime.datetime(2017, 10, 31)
>>> "{0.ctime()}".format(d)
they will receive an error message such as:
AttributeError: 'datetime.datetime' object has no attribute 'ctime()'
Proposal:
Raise an error stating that cannot embed arbitrary expressions in str.format() format strings |
|
Date |
User |
Action |
Args |
2017-10-31 00:35:20 | mickey695 | set | recipients:
+ mickey695 |
2017-10-31 00:35:20 | mickey695 | set | messageid: <1509410120.18.0.213398074469.issue31907@psf.upfronthosting.co.za> |
2017-10-31 00:35:20 | mickey695 | link | issue31907 messages |
2017-10-31 00:35:20 | mickey695 | create | |
|