Live data from Hacker News

What is Pythonic? (2005)

blog.startifact.com

1–10 of 21 posts

Re: What is Pythonic? (2005)

#3
Nice 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 to be consistent and to enforce clarity.

Re: What is Pythonic? (2005)

#5

Nice 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)

#6

Nice 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

I hate poorly styled code. Edit: I don't know why I'm being downvoted for this. That kind of mentality inherently churns out bad code.

Re: What is Pythonic? (2005)

#8
I think it's important to think of Pythonic as something that's subjective and evolving.

The 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)

#9
The 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?

Re: What is Pythonic? (2005)

#10

The 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?

Zope the framework really fell out of favor. Some of the good bits were pulled out and built into Repoze.bfg, which later merged with pylons (used by reddit etc) to become Pyramid.
Post reply on HN