3 ms·
I hesitate to add to the negative response to what is surely a well-meaning free project for the world. But `_` is really a poor choice for a variable name in P
by michaelhoffman 14y ago
I hesitate to add to the negative response to what is surely a well-meaning free project for the world. But `_` is really a poor choice for a variable name in Python. It is already used as:
* the value of the last expression in the REPL
* a conventional abbreviation for `gettext.gettext` (http://docs.python.org/library/gettext.html http://docs.python.org/library/gettext.html)
* a conventional throwaway variable (for `str.partition` and other functions that return a larger tuple than you want)
And for most of these features, invoking them through a object/class method rather than a standalone function is unwieldy (and unpythonic)
- j_baker 14y agoFrom the page itself: Please keep in mind that this is just a port of a javascript library, please don't get started with the "but it's not pythonic" stuff. This library has no intentions to be pythonic, infact it tries to bring same underscore experience from javascript to python. You have to give the author credit for his candor at least. That said, I like that the author of this is trying new things out. We can't let Python become petrified by rigid definitions of "pythonic".
- sitkack 14y agoOnly by being constructively critically reflective can we continue to grow. Pythonic is bandied about like a hammer. If people understood the intent of _pythonic_ I think they wouldn't use the term unpythonic so loosely.
- sitkack 14y agofrom underscore import _ as us