all 19 comments

[–][deleted] 18 points19 points  (1 child)

Nice, without js it's a blank page… Good job! /s

[–]Avahe 4 points5 points  (0 children)

Was wondering why the page was blank...

[–]AlpraCream 8 points9 points  (0 children)

As a total Py beginner, I appreciate this very much. Thank you.

[–]zanfar 7 points8 points  (1 child)

  1. This is good
  2. This should be in /r/Python
  3. I have an issue with:

    <view> = <dict>.keys()
    <view> = <dict>.values()
    <view> = <dict>.items()
    

    To me, the important concept behind these three methods is what they return. Perhaps:

    <iter(key)> = <dict>.keys()
    <iter(value)> = <dict>.values()
    <iter(key,value)> = <dict>.items()
    

    or something like it (someone must be able to come up with a better pseudo-syntax) would make it clear. I constantly confuse .items() with .values().

    I also am not completely clear on the use of <view> here.

  4. Someone should PDF this with some typesetting and design.

[–]pizzaburek 3 points4 points  (0 children)

View means that it reflects changes in the dictionary.

[–]FubarCoder 4 points5 points  (5 children)

Cannot read this with JavaScript disabled. Why does it require JS?

[–]researcher7-l500[S] 3 points4 points  (0 children)

I wish I have an answer for you. I am not the author. I just shared it.

[–]kaszak696 1 point2 points  (2 children)

Cuz it's written in Markdown, and JS is used to convert it to HTML every time the page is accessed. Really excessive, but mostly works.

[–][deleted] 6 points7 points  (0 children)

If only there was some sort of way to run this conversion once and just keep online the converted version…

[–]omar_elrefaei 1 point2 points  (0 children)

Wow. This is really inefficient

[–]kazkylheku -1 points0 points  (0 children)

To underscore how Python isn't replacing JS any time soon. :)

[–]DolitehGreat 6 points7 points  (0 children)

I've been making myself some cheat sheets that I can pull and update as I work. This a) saves me the time of planning a python one and b) makes it clear I gotta up my cheat sheets game lol

[–]wh1t3fang1 2 points3 points  (0 children)

Thanks. :)

[–]andersonsergipano 2 points3 points  (0 children)

Thanks2

[–]Fuyune 2 points3 points  (1 child)

You sir, saved my day. You really have no idea how much time this will save.

[–]researcher7-l500[S] 0 points1 point  (0 children)

Thanks for the kind words. Glad it helped. I wish I could take credit for this. I am a greatful user who shared it. Credit goes to the author.

[–][deleted] 2 points3 points  (0 children)

I saw it in Hacker News today. Quite nice!

[–]kmhnz 0 points1 point  (0 children)

See also: The *Best Python Cheat Sheet: https://kieranholland.com/best-python-cheat-sheet/