Live data from Hacker News

Ask HN: Good Python codebases to read?

news.ycombinator.com

151–153 of 153 posts

Re: Ask HN: Good Python codebases to read?

#151
post #103

Earlier quoted context omitted.

>Well, between a run of the mill programmer who happens to indent where he/she should vs Norvig, I will likely choose the latter If I could. Right. >Reminds me of that blog thread where this design pattern guru hemmed and hawed from his high horse I read a similar story a while ago. Two programmers are given the task of writing a program for some non-trivial problem. One of them, Hoity Toity Harry, tries to apply man…

Speaking of which, I once saw a user review of Norvig's book PAIP complaining about the unsophisticated code -- no monads, etc. (I forget what other patterns the reviewer wanted to see.)

Ha ha, good one. I wonder if the reviewer knew who Norvig is.

Re: Ask HN: Good Python codebases to read?

#152

Earlier quoted context omitted.

> Nice lambda. You've defended yourself admirably. Thanks! > Did you know there's an `operator.itemgetter` function that does that? Yes, I'm quite aware! Are you aware the "useless" functional solution with lambda is two characters shorter? >>> len('lambda item: item[1]') 20 >>> len('operator.itemgetter(1)') 22 Cause you're apparently not aware that I was demonstrating a use-case for lambdas as one-off functions that…

I bet you two would be good friends IRL.

I'm sure we would. I'll buy the first drink. :D

Re: Ask HN: Good Python codebases to read?

#153
I think Radon (https://github.com/rubik/radon/) is a good example of clean code. It's quite a small project, but it also gets right all the setup chore (like setup.py, testing, coverage, travis integration, etc.) which a beginner may find interesting.

Also, I second all the suggestions about Kenneth Reitz code, it's wonderful!

Post reply on HN