You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
-68
Original file line number
Diff line number
Diff line change
@@ -28,71 +28,3 @@ Python作为一个设计优美的交互式脚本语言,提供了许多人性
28
28
29
29
好了,那么我们开始吧!
30
30
31
-
32
-
[Section: Strain your brainn!](#这是一个测试)
33
-
34
-
35
-
# Structure of the Examples
36
-
37
-
All the examples are structured like below:
38
-
39
-
> ### ▶ Some fancy Title *
40
-
> The asterisk at the end of the title indicates the example was not present in the first release and has been recently added.
41
-
>
42
-
> ```py
43
-
># Setting up the code.
44
-
># Preparation for the magic...
45
-
>```
46
-
>
47
-
>**Output (Python version):**
48
-
>```py
49
-
>>>> triggering_statement
50
-
> Probably unexpected output
51
-
>```
52
-
> (Optional): One line describing the unexpected output.
53
-
>
54
-
>
55
-
>#### 💡 Explanation:
56
-
>
57
-
>* Brief explanation of what's happening and why is it happening.
58
-
>```py
59
-
> Setting up examples for clarification (if necessary)
60
-
>```
61
-
>**Output:**
62
-
>```py
63
-
>>>> trigger # some example that makes it easy to unveil the magic
64
-
># some justified output
65
-
>```
66
-
67
-
**Note:** All the examples are tested on Python 3.5.2 interactive interpreter, and they should work forall the Python versions unless explicitly specified in the description.
68
-
69
-
# Usage
70
-
71
-
A nice way to get the most out of these examples, in my opinion, will be just to read the examples chronologically, andfor every example:
72
-
- Carefully read the initial code for setting up the example. If you're an experienced Python programmer, most of the times you will successfully anticipate what's going to happen next.
73
-
- Read the output snippets and,
74
-
+ Check if the outputs are the same as you'd expect.
75
-
+ Make sure if you know the exact reason behind the output being the way it is.
76
-
- If no, take a deep breath, and read the explanation (andif you still don't understand, shout out! and create an issue [here](https://github.com/satwikkansal/wtfPython)).
77
-
- If yes, give a gentle pat on your back, and you may skip to the next example.
78
-
79
-
PS: You can also read WTFpython at the command line. There's a pypi package and an npm package (supports colored formatting) for the same.
80
-
81
-
To install the npm package [`wtfpython`](https://www.npmjs.com/package/wtfpython)
82
-
```sh
83
-
$ npm install -g wtfpython
84
-
```
85
-
86
-
Alternatively, to install the pypi package [`wtfpython`](https://pypi.python.org/pypi/wtfpython)
87
-
```sh
88
-
$ pip install wtfpython -U
89
-
```
90
-
91
-
Now, just run `wtfpython` at the command line which will open this collection in your selected `$PAGER`.
0 commit comments