Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
3  
Maybe Python coders have a stumped vocabulary :) –  James Love Feb 14 '11 at 22:18
6  
Maybe you need to look at the etymology. Before the language was named after a comedy troupe famous for their Flying Circus, the adjective Pythonic was used in reference to that troupe's work and that of others who were influenced by them. –  Peter Taylor Feb 14 '11 at 22:25
7  
Dude, feel free to call your own code Rubic, Prologic, Clojuric, Lispic, Javic, CiPluPluic, basic, perlic, erlangic, htmlic, CSSic, JavaScriptic, BrainFuckic, SeeSharpic, Dic, Cic, batic, shellic, bashic, powerShellic, efsharpic, schemic, pascalic, cobolic, adic, dosic, luaic ... I think I missed 7 languages. –  Job Feb 14 '11 at 22:49
2  
I've seen many people (on SO, mostly) start out saying they're going to write this in a "Pythonic way", then proceed to write absolutely horrible Python code (as far as being readable and idiomatic goes) just because they want to condense everything to certain features (e.g. list comprehensions or lambdas). Don't let these people unfairly color your view. Example: stackoverflow.com/q/4854588 –  Fred Nurk Feb 19 '11 at 7:25
    
I don't know, I happen to find the upvoted examples on that question fairly readable. –  Andrea Mar 27 '12 at 8:49
add comment

closed as not constructive by Mark Trapp Nov 15 '11 at 19:57

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 26 down vote accepted

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.

share|improve this answer
3  
+1 ... except "Pythonic" is probably a bad thing in other languages. :) –  Michael Urman Feb 15 '11 at 14:47
    
@Michael: Not the way I've seen it used. The people around where I live use the word "pythonic" for everything, not just python. –  Billy ONeal Feb 17 '11 at 17:33
    
Checking this because I really don't know the answer, and it seems to have garnered a lot of votes. –  Billy ONeal Feb 17 '11 at 17:34
4  
@Billy ONeal: If someone's using the word "pythonic" to describe code written in languages other than Python, they don't know what the word even means. They probably read it on a blog somewhere and want to sound cool. –  mipadi Feb 18 '11 at 17:24
add comment

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.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.