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
{{ message }}
Repository navigation
Commit 70f7888
Browse filesBrowse the repository at this point in the historyBrowse files
Including:
- Typo fixes (e.g. "Sphinc" -> "Sphinx", "ruin" -> "run", etc.)
- Python 3 errors with `print` used as a keyword vs. function
- Changing line numbers to start at 1 locally within an `ipython`
directive block (because they get renumbered anyhow)
- Normalizing all usage of IPython and Sphinx (some places were
lowercased, e.g. "ipython" and "sphinx")
- Converting tabs to spaces (tabs seemed inadvertent)
- Removing comments that have no effect on the block (output is
only checked by `doctest` and only displayed during `verbatim`)
- "Standardizing" the number of empty lines between sections
- Adding whitespace between operators / commas (per PEP8)
- Using implicit string concat rather than \-continuation
- Using codefont (via double backticks) for pseudo-decorator sections
- Adding "Enabling IPython Directive" section which explains which
Sphinx extensions enable this behavior
q = z[) # this is a syntax error -- we trap ipy exceptions
61
-
^
62
-
SyntaxError: invalid syntax
52
+
In [3]: print(z)
63
53
54
+
In [4]: q = z[) # this is a syntax error -- we trap exceptions
64
55
65
56
The embedded interpreter supports some limited markup. For example,
66
-
you can put comments in your ipython sessions, which are reported
57
+
you can put comments in your IPython sessions, which are reported
67
58
verbatim. There are some handy "pseudo-decorators" that let you
68
-
doctest the output. The inputs are fed to an embedded ipython
69
-
session and the outputs from the ipython session are inserted into
70
-
your doc. If the output in your doc and in the ipython session don't
71
-
match on a doctest assertion, an error will be
72
-
59
+
doctest the output. The inputs are fed to an embedded IPython
60
+
session and the outputs from the IPython session are inserted into
61
+
your doc. If the output in your doc and in the IPython session don't
62
+
match on a doctest assertion, an error will be raised
73
63
74
64
.. ipython::
75
65
76
66
In [1]: x = 'hello world'
77
67
78
-
# this will raise an error if the ipython output is different
68
+
# this will raise an error if the IPython output is different
79
69
@doctest
80
70
In [2]: x.upper()
81
71
Out[2]: 'HELLO WORLD'
@@ -87,79 +77,60 @@ match on a doctest assertion, an error will be
87
77
In [3]: x.st<TAB>
88
78
x.startswith x.strip
89
79
90
-
91
80
Multi-line input is supported.
92
81
93
82
.. ipython::
94
83
95
-
In [130]: url = 'http://ichart.finance.yahoo.com/table.csv?s=CROX\
0 commit comments