1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-22 19:14:24 +01:00

Fix a syntax error and some spelling errors (#72)

This commit is contained in:
Mélanie Chauvel 2018-02-28 21:37:48 +01:00 committed by Satwik Kansal
parent ea5fc2f47f
commit db35390786

10
README.md vendored
View File

@ -77,7 +77,7 @@ So, here we go...
- [ Yes, it exists!](#-yes-it-exists) - [ Yes, it exists!](#-yes-it-exists)
- [ Inpinity *](#-inpinity-) - [ Inpinity *](#-inpinity-)
- [ Mangling time! *](#-mangling-time-) - [ Mangling time! *](#-mangling-time-)
- [Section: Miscallaneous](#section-miscallaneous) - [Section: Miscellaneous](#section-miscellaneous)
- [ `+=` is faster](#--is-faster) - [ `+=` is faster](#--is-faster)
- [ Let's make a giant string!](#-lets-make-a-giant-string) - [ Let's make a giant string!](#-lets-make-a-giant-string)
- [ Explicit typecast of strings](#-explicit-typecast-of-strings) - [ Explicit typecast of strings](#-explicit-typecast-of-strings)
@ -241,7 +241,7 @@ some_dict[5] = "Python"
True True
``` ```
**Note:** Objects with different values may also have same hash (known as hash collision). **Note:** Objects with different values may also have same hash (known as hash collision).
* When the statement `some_dict[5] = "Python"` is executed, the existing value "JavaScript" is overwritten with "Python" because Python recongnizes `5` and `5.0` as the same keys of the dictionary `some_dict`. * When the statement `some_dict[5] = "Python"` is executed, the existing value "JavaScript" is overwritten with "Python" because Python recognizes `5` and `5.0` as the same keys of the dictionary `some_dict`.
* This StackOverflow [answer](https://stackoverflow.com/a/32211042/4354153) explains beautifully the rationale behind it. * This StackOverflow [answer](https://stackoverflow.com/a/32211042/4354153) explains beautifully the rationale behind it.
--- ---
@ -2127,7 +2127,7 @@ Why did `Yo()._Yo__honey` worked? Only Indian readers would understand.
--- ---
## Section: Miscallaneous ## Section: Miscellaneous
### ▶ `+=` is faster ### ▶ `+=` is faster
@ -2369,8 +2369,8 @@ If you have any wtfs, ideas or suggestions, please share.
You can use these quick links for Twitter and Linkedin. You can use these quick links for Twitter and Linkedin.
[Twitter](https://twitter.com/intent/tweet?url=https://github.com/satwikkansal/wtfpython&hastags=python,wtfpython) | [Twitter](https://twitter.com/intent/tweet?url=https://github.com/satwikkansal/wtfpython&hastags=python,wtfpython)
[Linkedin](https://www.linkedin.com/shareArticle?url=https://github.com/satwikkansal&title=What%20the%20f*ck%20Python!&summary=An%20interesting%20collection%20of%20subtle%20and%20tricky%20Python%20snippets.) | [Linkedin](https://www.linkedin.com/shareArticle?url=https://github.com/satwikkansal&title=What%20the%20f*ck%20Python!&summary=An%20interesting%20collection%20of%20subtle%20and%20tricky%20Python%20snippets.)
## Need a pdf version? ## Need a pdf version?