5 ms·
pythonic is easily summed up whenever you type 'import this'! for those without a python interpreter handy: >>> import this The Zen of Python, by Tim Peters
by vitno 14y ago
pythonic is easily summed up whenever you type 'import this'!
for those without a python interpreter handy:
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
- tutuca 14y agoHave you actually read the article? It's quite clear that the author at least knows that. Also, there is a general concensus that pep 0008 and the zen of python are not the only definition of pythonic.
- fayden 14y agoI believe his comment is intended to people reading the comments and not to the author.
- rbanffy 14y agoBTW, I've been struggling with this: why smart people consider buildout pythonic and pip install -r unpythonic? Can anyone defend that position? Would that change if I were Dutch?
- rbanffy 14y agoJust to be clear, this is a real question. I'd like someone who likes and uses buildout to engage in a constructive discussion about its merits.
- slurgfest 14y agoI don't think the Python community in general dictates the use of buildout at all. I reckon there are more supporters for pip install -r (although I would take correction). So the question becomes, why some smart people consider buildout Pythonic. I guess they just like it.
- huxley 14y agoBuildout came first and can do more things than pip can. If your workflow was heavily dependent on buildout, I could see how someone would see pip as inadequate. Buildout also came from the Zope community, so that will immediately break people up into camps. My impression is also that more people use pip now particularly with its integration with virtualenv. I can't imagine not developing with pip and virtualenv now.
- ajross 14y agoBrief para-literary digression: I'm always amused when I read this. All of it is straightforward advice and good when applied sanely, of course. But... the whole thing just drips with an insecurity complex over perl. Where Larry & Co. were shocking the world with the cacophany of TMTOWTDI and their Laziness, Impatience and Hubris, the python people just look... scared of all that stuff. So they have this meek list instead. There's sanity here, but no poetry. I think this explains my reaction to python every time I'm forced to use or maintain it -- there's no fun in the language, just proscription. Programming should be fun, right?
- softbuilder 14y ago>the whole thing just drips with an insecurity complex over perl. JAPH to Pythonista convert here. I think it definitely is a reaction to Perl, but the "insecurity complex" phrasing has its own insecurity complex peeking out. The Zen dates from 2004, when the writing was on the wall for Perl. (That writing on the wall was in Ruby, Python, and PHP.) Very little to feel insecure about by then. Also, beauty and simplicity are hardly meek values, but I understand the subjectivity. To each his own.