pyformat.info icon indicating copy to clipboard operation
pyformat.info copied to clipboard

Re-arranging order of display is possible using % operator

Open jforberg opened this issue 4 years ago • 1 comments

...This allows for re-arranging the order of display without changing the arguments. This operation is not available with old-style formatting.

This is false. Consider: '%(b)s %(a)s' % { 'a': 'one', 'b': 'two' }

This functionality has been in Python since "forever" (20+ years), as far as I can tell.

jforberg avatar May 18 '20 13:05 jforberg

While true that this has been possible forever, it's question of semantics.

The paragraph you're quoting is talking about positional arguments which aren't possible to reorder using % formatting.

If you can come up with a less absolute statement that doesn't unnecessarily confuse the matter I'd consider integrating it.

ulope avatar May 18 '20 14:05 ulope