mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-11-22 11:04:25 +01:00
Fix relevant typos detected by codespell
Closes https://github.com/satwikkansal/wtfpython/issues/161
This commit is contained in:
parent
9a2718ae3a
commit
2c910351b7
2
CONTRIBUTING.md
vendored
2
CONTRIBUTING.md
vendored
@ -29,7 +29,7 @@ Probably unexpected output
|
|||||||
```py
|
```py
|
||||||
Setting up examples for clarification (if necessary)
|
Setting up examples for clarification (if necessary)
|
||||||
```
|
```
|
||||||
**Outupt:**
|
**Output:**
|
||||||
```py
|
```py
|
||||||
>>> trigger # some example that makes it easy to unveil the magic
|
>>> trigger # some example that makes it easy to unveil the magic
|
||||||
# some justified output
|
# some justified output
|
||||||
|
2
README.md
vendored
2
README.md
vendored
@ -575,7 +575,7 @@ def one_more_func(): # A gotcha!
|
|||||||
print("Iteration", i)
|
print("Iteration", i)
|
||||||
break
|
break
|
||||||
except ZeroDivisionError as e:
|
except ZeroDivisionError as e:
|
||||||
print("Zero division error ocurred", e)
|
print("Zero division error occurred", e)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Output:**
|
**Output:**
|
||||||
|
19
irrelevant/notebook_instructions.md
vendored
19
irrelevant/notebook_instructions.md
vendored
@ -5,22 +5,3 @@
|
|||||||
- Reorder the examples, so that the ones that work are upfront.
|
- Reorder the examples, so that the ones that work are upfront.
|
||||||
- Run the `notebook_generator.py`, it will generate a notebook named `wtf.ipynb`
|
- Run the `notebook_generator.py`, it will generate a notebook named `wtf.ipynb`
|
||||||
- Revert the README.md changes (optional)
|
- 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!
|
|
||||||
|
|
||||||
|
|
||||||
|
2
irrelevant/obsolete/add_categories
vendored
2
irrelevant/obsolete/add_categories
vendored
@ -139,7 +139,7 @@ f*
|
|||||||
Half triple-quoted strings
|
Half triple-quoted strings
|
||||||
f
|
f
|
||||||
|
|
||||||
Implicity key type conversion
|
Implicit key type conversion
|
||||||
f*
|
f*
|
||||||
|
|
||||||
Stubborn `del` operator
|
Stubborn `del` operator
|
||||||
|
4
irrelevant/wtf.ipynb
vendored
4
irrelevant/wtf.ipynb
vendored
@ -1044,7 +1044,7 @@
|
|||||||
" \n",
|
" \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",
|
" > 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",
|
"- 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",
|
" print(\"Iteration\", i)\n",
|
||||||
" break\n",
|
" break\n",
|
||||||
" except ZeroDivisionError as e:\n",
|
" except ZeroDivisionError as e:\n",
|
||||||
" print(\"Zero division error ocurred\", e)\n"
|
" print(\"Zero division error occurred\", e)\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user