Honestly, I hate the word "Pythonic" -- it's used as a simple synonym of "good" in many circles, and I think that's pretentious. Those who use it are silently saying that good code cannot be written in a language other than Python. Not saying Python is a bad language, but it's certainly not the "end all be all language to solve ALL of everyone's problems forever!" (Because that language does not exist). What it seems like people who use this word really mean is "idiomatic" rather than "Pythonic" -- and of course the word "idiomatic" already exists. Therefore I wonder: Why does the word "Pythonic" exist?
2 Answers
Those who use it are silently saying that good code cannot be written in a language other than Python.
No, those who use it are saying "this looks like good Python code". Nothing more, nothing less. It applies in the context of Python code. It's used to contrast code that uses Python idioms to code that doesn't use Python idioms.
Yes, if you were to write Python code as though it's, say, Java, it would probably be described as "not Pythonic". This is not to say that Java code written like Java code is ugly, or that anything not written in the Python style is ugly; it's to say that Python code not written using Python idioms is not Pythonic.
"Pythonic" is synonymous with "idiomatic", but more specifically, it's synonymous with "idiomatic Python".
"Pythonic" does not say anything about code written in other languages.
- 7,533
Idiomatic isn't specific. Pythonic refers specifically to the idioms that Python supports via its structure, syntax and libraries.
And yeah, it's a little pretentious.
- 2,962
- 22
- 21