Live data from Hacker News

Python Cheatsheet

gto76.github.io

41–43 of 43 posts

Re: Python Cheatsheet

#41
post #40

Fantastic amount of information in a single page. . However there are two things I do not like: 1. Use of notation for almost everything. It might be technically sound, but it brings to mind reading Backus-Naur form specs. For cheat sheets my_int, my_iterator etc format is more pleasant for eyes. 2. Examples from various external libraries are of questionable real life utility, they are a nice showcase of what is pos…

Color or underline would be a good marker for the variables. Even better than having a prefix "my_" for the visual noise factor.

Re: Python Cheatsheet

#42
post #32

This is great, thanks Jure. For whatever reason I find it difficult to read documentation, I work much better with code examples, they speak to me much more clearly than a text explanation.

Official python documentation is awful to read, I always give up reading and look somewhere else. This page is great, I love it :)

I think the online documentation for Python stdlib is quite good. What I don't understand is why more of it is not available in help() from Python itself. For all the docstring features in Python, the stdlib somehow just has second rate documentation in module and function docstrings!

Compare with numpy and scipy, where the docstrings are comprehensive (there's a correspondance between online and embedded docs.)

Re: Python Cheatsheet

#43
post #3

who exactly is this aimed at? why would they not use the python on-line documentation?

I can't read the entire python documentation in an hour. And having never taken a programming class or worked alongside a professional software engineer, I only know what it's occurred to me to look for. Python has lots of tools that I didn't know I needed. Probably the same us true for most people, and the only difference is what level of "cheatsheet" is appropriate.

I'm embarrassed to say I learned what generators are from this. 7 lines of code; totally unambiguous explanation. I don't even use iterators all that often, so I'm not surprised that I've never googled something that lead me to them.

Post reply on HN