Hacker News new | past | comments | ask | show | jobs | submit login
A Python cheat sheet for those of us who do (coffeeghost.net)
35 points by bdfh42 on March 11, 2008 | hide | past | favorite | 11 comments



Pretty disappointing.


I run/host a community of Python new entry-level scripters. This seems perfect for them to see so they'll understand a little more about what they're seeing.

I'd welcome any other cheat sheets which you prefer, though. I was actually impressed at the clarity of this one because it's covered a lot of concepts that literally took a few forum posts to clarify for newbies.


Could have at least used a dict.

Makes me want to do one of these now though.


You should; be sure to post the fruits of your efforts online for everyone else.


in PDF


Not a bad reference for newbies, but this lacks some important things (dictionaries, tuples, list comprehensions, lambdas etc.). Also, the arrow-style explanations don't lend well to a quick-search reference.


Isn't using a "main" function a C-ism? I have never heard of such a convention when programming in Python.

Is there one? Does the BDFL know about it?


No, it's actually used. In this article the creator of Python talks about it: http://www.artima.com/weblogs/viewpost.jsp?thread=4829


...and for those who have never seen a programming language ever. Do they really need arrows that point to comments that say, "This is a comment"?


They don't need to but it succinctly highlights the fact that there are two different ways of commenting code in Python.


it's missing 'pass' which is essential if you wish for automatic indentation to work properly




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: