Live data from Hacker News

Python Cheatsheet

gto76.github.io

21–30 of 43 posts

Re: Python Cheatsheet

#21

Earlier quoted context omitted.

Sure, but I strongly suspect that it was a part of the corpus (it's been online for ~5 years now).

I asked it to generate something similar for golang with a snippet of the list section, and the results look pretty similar. So I don't think it's relying too heavily on a direct example.

I think you're right, I already asked it for some libraries that are not included in the original (fuck my life :) https://gist.github.com/gto76/9ed16511a046d9746d38c55a14ec09...

Re: Python Cheatsheet

#22
post #13
post #7

That is a lot of data for a single page IMO. You already have a TOC, several library sections might be pages unto themselves. You might also cross link topics into their relevant python docs for deeper references. I know I always need to dig deeper into CSV/argparse for specific things when working with those systems. Edit: awesome content

> That is a lot of data for a single page IMO. It is great for a cheat sheet to be on a single page. It makes ctrl+f searching useful and quick.

At what point does something move from being a cheat-sheet to being a reference manual/training document? I don't have a hard definition other than the "you know it when you see it" and this cross that threshold for me.

A cheat-sheet I really like is https://devhints.io/bash which I feel has just enough info (for me) when jumping back into bash from other work to give me proper context.

Re: Python Cheatsheet

#23

Earlier quoted context omitted.

I asked it to generate something similar for golang with a snippet of the list section, and the results look pretty similar. So I don't think it's relying too heavily on a direct example.

I think you're right, I already asked it for some libraries that are not included in the original (fuck my life :) https://gist.github.com/gto76/9ed16511a046d9746d38c55a14ec09...

Really solid chat prompt idea, for sure!

Re: Python Cheatsheet

#25
I highly highly highly recommend using something like Zeal for documentation viewing. It's so much faster to type in something and read docs than to google, no matter how fast your internet is. Though it's more limited to knowing what object you're looking for already

(The first person to mention ChatGPT gets bopped. I do not need to use an LLM to look up module documentation)

Re: Python Cheatsheet

#26
this reminds me of the perlrefs I used to download and printout; despite having years of perl coding, I'd often forget which combinations of @#$%^&* (ok I'm just randomly typing now!) I'd have to use.

Re: Python Cheatsheet

#27
post #16

Earlier quoted context omitted.

Discoverability, a document like this makes it much easier to find features and tools you were unaware of. The Python documentation is awesome, but it doesn't provide a 30k ft overview of the language and standard library, especially when the standard lib is so comprehensive.

i really don't see how - i have never had had any difficulty searching for features in the standard library documentation.

Your experience is not the same as everyone else's.

Re: Python Cheatsheet

#29
Previous discussion: https://news.ycombinator.com/item?id=29679788 (243 points | Dec 25, 2021 | 57 comments)

See also:

* Python Crash Course cheatsheet: https://ehmatthes.github.io/pcc_3e/cheat_sheets/

* Scientific Python cheatsheet: https://ipgp.github.io/scientific_python_cheat_sheet/

* Common beginner errors: https://pythonforbiologists.com/29-common-beginner-errors-on...

* Python regular expression cheatsheet: https://learnbyexample.github.io/python-regex-cheatsheet/ — my blog post, includes examples as well

Re: Python Cheatsheet

#30
post #3

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

personally I find online docs too bothersome. Over the years I've made an entire folder of cheatsheet org-mode files and when I work I can just hit a hotkey and grep them. Also writing and updating them actually helps memorize things
Post reply on HN