3 ms·
This page is reasonable evidence that "one (obvious) way to do it" has gone out the window, and that nowadays Python takes the kitchen sink approach like many o
by anewhnaccount 11y ago
This page is reasonable evidence that "one (obvious) way to do it" has gone out the window, and that nowadays Python takes the kitchen sink approach like many other languages, particularly those which have an "old" and a "new" way of doing things. Examples are:
* Javascript (ECMAScript4, ECMAScript5 and ECMAScript6 all have different ways of iterating a collection! Not the mention the many utility libraries which implement quite basic things in different ways)
* PHP (Old school no-OO built-ins, <?php templating vs Java style OO PHP5+ and the SPL, )
* C++ ("C with classes" vs varying degrees of template magic, STL and Boost)
I'm beginning to feel quite sceptical about whether these types of changes are actually worth it. % on strings was a little bit quirky but fine - I don't see why .format() is better -- people are still going to encounter the first so the damage is already done. Using either of the first two with .update() was fine.
- collyw 11y agoThe first (or second) seem pretty obvious to me.