Best Python Reference Ever
github.com
Best Python Reference Ever
1–10 of 20 posts
Re: Best Python Reference Ever
#2>To dynamically access function's first free variable use '.__closure__[0].cell_contents'.
Re: Best Python Reference Ever
#3Re: Best Python Reference Ever
#4It looks more like an XML cheatsheet at first glance.
I work in python full-time for a living, and found myself having to re-examine several times to make sense of this wacky, non-standard notation.
-------
Edit:
Keep in mind there's a standard way to represent these options in a clear, consistent manner (lists, sequences, optional args).
No need to re-invent something that's hard to read and understand.
See: https://docs.python.org/3/library/stdtypes.html#sequence-typ...
Re: Best Python Reference Ever
#5A key hallmark of Python is readability - which this cheat sheet has managed to royally screw up. It looks more like an XML cheatsheet at first glance. I work in python full-time for a living, and found myself having to re-examine several times to make sense of this wacky, non-standard notation. ------- Edit: Keep in mind there's a standard way to represent these options in a clear, consistent manner (lists, sequence…
A proper cheatsheet takes liberties for the sake of achieving both brevity and comprehensiveness at the same time.
Re: Best Python Reference Ever
#6A key hallmark of Python is readability - which this cheat sheet has managed to royally screw up. It looks more like an XML cheatsheet at first glance. I work in python full-time for a living, and found myself having to re-examine several times to make sense of this wacky, non-standard notation. ------- Edit: Keep in mind there's a standard way to represent these options in a clear, consistent manner (lists, sequence…
Take, for example, the definition of the operation s[i:j] in the Python docs: the result is "slice of s from i to j". Is that the same type as the input? Is it an iterator? No information.
I doubt most people are confused about the output, but a reference is specifically for people who are uncertain about how a function works.
Re: Best Python Reference Ever
#7>> .append() # Or: += []
Not a fan of the += syntax in this instance - seeing .append instantly lets me know I'm dealing with a list whereas += can be used on almost anything
Re: Best Python Reference Ever
#8Re: Best Python Reference Ever
#9A key hallmark of Python is readability - which this cheat sheet has managed to royally screw up. It looks more like an XML cheatsheet at first glance. I work in python full-time for a living, and found myself having to re-examine several times to make sense of this wacky, non-standard notation. ------- Edit: Keep in mind there's a standard way to represent these options in a clear, consistent manner (lists, sequence…
Please explain to me why then you introduce a binding after you use it in array comprehensions.
[x*2 for x in range(1,10)]Re: Best Python Reference Ever
#10Why does everyone find the notation confusing? means its a list, and so on. I'm really surprised it's tripping people up.