

Python Cheat Sheet - vacipr
https://docs.google.com/file/d/0B9VT_L2CDnKvODYyNTc5NjktYmMyOC00NDFkLTliNTctMzQzMTAzYjUyYmYy/edit?pli=1
Not mine,found it on reddit.I submitted this here because I thought it might be useful to some people.<p>Here is the original link: http://www.reddit.com/r/Python/comments/zbwme/is_anyone_interested_in_the_python_cheat_sheet_i/
======
nemetroid
This cheat sheet sucks. Some examples:

> list1.extend(object1): Extends list1 with object1 creating a whole list
> instead of append which jams a an object inside the list.

Extend takes an iterable and not an object. Not sure I can even comprehend
that sentence.

> dictionary1.update(dictionary2): updates dictionary1 with values from
> identical keys in dictionary2

Identical to what? Update adds all key-value pairs from dictionary2. I guess
the text _might_ refer to the fact that update overwrites existing values.

> ‘string1’.strip(): Returns one string with whitespace removed.

Only at the start and end of the string.

> ’string1’.count(object1): Returns the number of times that object1 appears
> in string1.

This method doesn't exist as far as I can tell and I'm not sure how an object
"appears" in a string.

~~~
mercuryrising
> This cheat sheet sucks. Some examples:

Make a better one and get it to the front page of HN.

~~~
nemetroid
Whether or not I make one has no bearing on this one's quality.

------
antidoh
I like this:

<http://rgruet.free.fr/PQR27/PQR2.7.html>

Other versions available.

Go to the page and search for your thing, easy.

~~~
cwe
Thanks for sharing this, and thanks to the OP for these great resources. After
taking a few Udacity courses, this will help me retain/expand on my Python
skills!

------
njharman
I'm not critizing this, which looks nice esp for people learning (and I'm sure
somepeople "work" better with cheat sheets)

But, one reason I like Python is it's small and regular enough to not need a
cheat sheet (this does not apply to stdlib which has large swaths of wtfness,
and is changing as people keep bloating up the language, ternary)

And, any decent editor should be highlighting, tab completing and hooked into
pyhelp to provide a context aware , dynamic, interactive "cheat sheet". E.g
vim with following vim plugins pydoc, python_calltips, supertab and proly
should throw in pep8 and pyflakes. Check it ->
<https://github.com/njharman/dotfiles>

------
bigdubs
No offense to the author, but the length of this thing! may as well just use
<http://docs.python.org/library/index.html>

~~~
brittohalloran
More like a cheat packet than a cheat sheet

------
kibwen
Any idea why they appear to prefer `cmath.pi` and `cmath.e` rather than
`math.pi` and `math.e`?

------
fara
I like it a lot and looks very handy. But the author seems to be missing the
point of a cheat sheet. I'd prefer something I can post on my desk to take a
quick look, a 6 page summary is not a cheat sheet nor it's faster than
googling.

------
peacemaker
Nice work! One minor thing I noticed... dictionary.has_key is deprecated, use
the 'in' keyword instead:
[http://docs.python.org/release/3.1.5/whatsnew/3.0.html#built...](http://docs.python.org/release/3.1.5/whatsnew/3.0.html#builtins)

------
res0nat0r
I don't have any language cheatsheets anymore and just use
<http://hyperpolyglot.org/> it has great examples and comparisons for most all
languages I'm interested in, in a nice and easy to read format too.

------
pav3l
Here is one that is literally just 1 page: <http://i.imgur.com/tpze9.jpg>

------
ralsina
Bah: <https://github.com/ralsina/python-cheatsheet>

------
vacipr
Not mine,found it on reddit.I submitted this here because I thought it might
be useful to some people.

Here is the original link:
[http://www.reddit.com/r/Python/comments/zbwme/is_anyone_inte...](http://www.reddit.com/r/Python/comments/zbwme/is_anyone_interested_in_the_python_cheat_sheet_i/)

~~~
fnordfnordfnord
Will some Reddit'r please go and rough him up a bit over the file format
(docx). I was going to post this here, until I noticed that it was a repost
from Reddit. Cheers

Please use non-proprietary document formats. It's the polite thing to do.
<http://www.fsf.org/campaigns/opendocument/reject>

~~~
briancurtin
Yeah, that's the spirit! Some person makes a free document that they think
will help people, so let's push document formats down their throat.

Be sure to tell them about Linux while you're harping on their file format
choice.

------
rodriguezcommaj
As someone currently going through Learn Python The Hard Way - this is an
awesome resource. A lot of it is over my head, but it is an awesome way to
scan through stuff without having to dig through the official documentation.
It also helped solidify some of the concepts that I am learning, so thank you.

------
kroger
Shameless plug: I have a two-page cheat sheet: <http://pedrokroger.net/python-
quick-reference/>

------
tomrod
I like this. Anyone feel like extending this to Numpy? I tend to use the
Matlab/Numpy conversion page all the time.

------
smilliken
iPython[1] or bPython[2] will usually be a better reference since you can
explore API's, documentation, and source code directly.

[1] <http://ipython.org/>

[2] <http://bpython-interpreter.org/>

------
foobarram
Amazing! Thanks for this.

------
naavinm
Sweet, thanks.

