8 Sep
2015
8 Sep
'15
4:27 a.m.
"Stephen J. Turnbull"
Random832 writes:
But anyway, my ideal version of it would have a .format method, but using identical format strings.
"Identical" is impossible, even you immediately admit that an extension is necessary:
By "Identical" I meant there would be a single mechanism, including all new features, used for both str.format and str.__mod__ - i.e. the extensions would also be available using the % operator. The extensions would be implemented, but the % operator would not be left behind. Hence, identical.