Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-arranging order of display is possible using % operator #58

Open
jforberg opened this issue May 18, 2020 · 1 comment
Open

Re-arranging order of display is possible using % operator #58

jforberg opened this issue May 18, 2020 · 1 comment

Comments

@jforberg
Copy link

...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.

@ulope
Copy link
Owner

ulope commented May 18, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants