wtfpython icon indicating copy to clipboard operation
wtfpython copied to clipboard

Improve "hash brownies" example and explanation

Open jab opened this issue 7 years ago • 4 comments

I found the current "hash brownies" example and explanation confusing, so I'm proposing these changes.

This is clearer because it focuses on equivalence as the key principle first, without muddying the waters with hashing and immutability up front.

Once this does mention hashing, it explains it in the context of being a performance optimization (which is all it is), not as something that is central to what containment in a dict actually means.

Hope this helps!

jab avatar Mar 27 '18 08:03 jab

Resolve conflicts?

cclauss avatar Dec 26 '19 09:12 cclauss

I'll leave it up to @satwikkansal, whose 7b22f84f97723b5b8b49435a5810c37bcbbbd582 (in response to my #77) landed before this did with overlapping intent.

jab avatar Dec 28 '19 01:12 jab

Sorry, totally forgot about this PR. Addressed this PR in the recent commit https://github.com/satwikkansal/wtfpython/commit/185d60c1b696e2029f7e6d641afe272ca466feec, I think it can be closed now.

satwikkansal avatar Dec 31 '19 10:12 satwikkansal

I think it can be closed now.

In such case I would recommend closing it.

matkoniecz avatar Feb 11 '21 08:02 matkoniecz