3 ms·
I've been using GitHub code search to let other Python programmers know about the % string formatter. I search for ".2f}%'.format(100" and then send a push req
by edward 10y ago
I've been using GitHub code search to let other Python programmers know about the % string formatter.
I search for ".2f}%'.format(100" and then send a push request to simplify the code.
See https://github.com/EdwardBetts?tab=overview&from=2016-04-19 https://github.com/EdwardBetts?tab=overview&from=2016-04-19
- Patient0 10y agoAnd what is the simplification? I can't see it in your git repo
- deleted 10y ago[deleted]
- Pyppe 10y ago"Percentage: {:.2f}%".format(foobar * 100) vs "Percentage: {:.2%}".format(foobar)
- hughperkins 10y agoits actually harder to read, in my opinion, since the % character is often used for formatting,eg '%s' % somevar. personally, i dislike such spammy prs. it adds nothing to my code, and its not like accepting the pr is going to attract you as a developer on my code.
- deleted 10y ago[deleted]
- infogulch 10y agoThis makes me think... maybe this could be generalized into a linter-as-a-service that occasionally submits pull requests for obvious style wins. Maybe just commenting on existing pull requests to be less annoying (and because there's a better chance it can be fixed by the issue opener).