What is Pythonic? (2005)
blog.startifact.com
What is Pythonic? (2005)
1–10 of 21 posts
Re: What is Pythonic? (2005)
#2Re: What is Pythonic? (2005)
#3Re: What is Pythonic? (2005)
#4(edit: It actually is, half of the good things in Python, like list comprehensions and tuples and destructuring, were first seen in functional languages!)
Re: What is Pythonic? (2005)
#5Nice overview. I think a lot of the tenets of pythonicness are based on the heuristic that there should be minimal cruft and friction between the reader and the code. I should be looking at a reasonably close approximation of my interpretation of the problem. Was it let or var? Semicolon or no semicolon? Was it := or set! Usually, syntax is minimal enough to get out of your way, and where there is syntax, it attempts…
Re: What is Pythonic? (2005)
#6Nice overview. I think a lot of the tenets of pythonicness are based on the heuristic that there should be minimal cruft and friction between the reader and the code. I should be looking at a reasonably close approximation of my interpretation of the problem. Was it let or var? Semicolon or no semicolon? Was it := or set! Usually, syntax is minimal enough to get out of your way, and where there is syntax, it attempts…
In most of those cases there's no point thinking of them, just type the first one that comes to mind and move on
Re: What is Pythonic? (2005)
#7Re: What is Pythonic? (2005)
#8The C examples given are idiomatic in C. The reason they're idiomatic is because they fit with a mental model that most of the C community uses: data structures in an enumerated address space, and passing around hunks of mutable memory with handshake semantics. If your code interacts with code that was written with that in mind, life should be pretty good.
Python has the same sort of thing, but at a different level of abstraction: objects, frequently enumerated by identity, grouped together by user-defined abstractions, with the understanding that function side effects are rare, unless they're object methods.
Haskell is arguably cleaner / terser, but it's yet another set of idioms. The only thing that makes pythonic Python is that it's used by the rest of the community. It's a shared understanding that's neither better or worse than any other shared understanding.
Re: What is Pythonic? (2005)
#9Re: What is Pythonic? (2005)
#10The article mentions Zope quite a bit - which was a big thing for a company I worked for in 2001 (Loudcloud), as we had a number of customers that wanted to use it. Whatever happened to Zope? Wikipedia seems to suggest there hasn't been much development in the last 4 years - anybody know?