[Python-ideas] A suggestion for Python 3 vs Python 2

Andrew Barnert abarnert at yahoo.com
Tue Nov 12 11:11:57 CET 2013


On Nov 11, 2013, at 19:45, Xuancong Wang <xuancong84 at gmail.com> wrote:

> Another suggestion is that 'enumerate' is also frequently used, hopefully we can shorten the command as well.

One huge advantage of everything being regular functions is that it's ridiculously easy to experiment with this. Want to see what it's like to use "en" or "ix" or whatever instead of enumerate? Just do "en = enumerate", and you can start using it. See how it affects your typing speed, and the readability of your code. (Obviously it will make your code less readable to the general Python community, but ignore that; the interesting question is whether you--or, better, a small group you work in--find it readable once you get used to it).

Meanwhile, I personally vastly prefer print as a function to a statement. I can pass print to a function instead of having to write an out-of-line wrapper with def. I can do quick joining without spaces, and no-newline-ing without having to mess with magic commas. But then, like most of the others who prefer print as a function, I don't actually use it nearly as much as the people who are complaining, so maybe that doesn't mean much.


More information about the Python-ideas mailing list