Fix relevant typos detected by codespell

Closes https://github.com/satwikkansal/wtfpython/issues/161
This commit is contained in:
Satwik 2019-12-27 20:04:34 +05:30
parent 9a2718ae3a
commit 2c910351b7
5 changed files with 5 additions and 24 deletions

2
CONTRIBUTING.md vendored
View File

@ -29,7 +29,7 @@ Probably unexpected output
```py
Setting up examples for clarification (if necessary)
```
**Outupt:**
**Output:**
```py
>>> trigger # some example that makes it easy to unveil the magic
# some justified output

2
README.md vendored
View File

@ -575,7 +575,7 @@ def one_more_func(): # A gotcha!
print("Iteration", i)
break
except ZeroDivisionError as e:
print("Zero division error ocurred", e)
print("Zero division error occurred", e)
```
**Output:**

View File

@ -5,22 +5,3 @@
- Reorder the examples, so that the ones that work are upfront.
- Run the `notebook_generator.py`, it will generate a notebook named `wtf.ipynb`
- Revert the README.md changes (optional)
# Hosted notebook instructions
This is just an experimental attempt of browsing wtfpython through jupyter notebooks. Some examples are read-only because,
- they either require a version of Python that's not supported in the hosted runtime.
- or they can't be reproduced in the notebook envrinonment.
The expected outputs are already present in collapsed cells following the code cells. The Google colab provides Python2 (2.7) and Python3 (3.6, default) runtimes. You can switch among these for Python2 specific examples. For examples specific to other minor versions, you can simply refer to collapsed outputs (it's not possible to control the minor version in hosted notebooks as of now). You can check the active version using
```py
>>> import sys
>>> sys.version
# Prints out Python version here.
```
That being said, most of tbe examples do work as expected. If you face any trouble, feel free to consult the original content on wtfpython and create an issue in the repo. Have fun!

View File

@ -139,7 +139,7 @@ f*
Half triple-quoted strings
f
Implicity key type conversion
Implicit key type conversion
f*
Stubborn `del` operator

View File

@ -1044,7 +1044,7 @@
" \n",
" > Equality tests between OrderedDict objects are order-sensitive and are implemented as `list(od1.items())==list(od2.items())`. Equality tests between `OrderedDict` objects and other Mapping objects are order-insensitive like regular dictionaries.\n",
"- The reason for this equality is behavior is that it allows `OrderedDict` objects to be directly substituted anywhere a regular dictionary is used.\n",
"- Okay, so why did changing the order affect the lenght of the generated `set` object? The answer is the lack of intransitive equality only. Since sets are \"unordered\" collections of unique elements, the order in which elements are inserted shouldn't matter. But in this case, it does matter. Let's break it down a bit,\n"
"- Okay, so why did changing the order affect the length of the generated `set` object? The answer is the lack of intransitive equality only. Since sets are \"unordered\" collections of unique elements, the order in which elements are inserted shouldn't matter. But in this case, it does matter. Let's break it down a bit,\n"
]
},
{
@ -1289,7 +1289,7 @@
" print(\"Iteration\", i)\n",
" break\n",
" except ZeroDivisionError as e:\n",
" print(\"Zero division error ocurred\", e)\n"
" print(\"Zero division error occurred\", e)\n"
]
},
{