Skip to content

Commit b00c3d9

Browse files
committed
Input, Cython
1 parent 3183af6 commit b00c3d9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,11 +1531,11 @@ pprint(<collection>, width=80, depth=None, compact=False, sort_dicts=True)
15311531
Input
15321532
-----
15331533
```python
1534-
<str> = input(prompt=None)
1534+
<str> = input([<obj>])
15351535
```
15361536
* **Reads a line from the user input or pipe if present (trailing newline gets stripped).**
1537-
* **Prompt string is printed to the standard output before input is read.**
1538-
* **Raises EOFError when user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.**
1537+
* **If argument is passed, it gets printed to the standard output before input is read.**
1538+
* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.**
15391539

15401540

15411541
Command Line Arguments
@@ -3516,7 +3516,7 @@ Appendix
35163516
```python
35173517
# $ pip3 install cython
35183518
import pyximport; pyximport.install() # Module that runs imported Cython scripts.
3519-
import <cython_script> # Script needs a '.pyx' extension.
3519+
import <cython_script> # Script's filename needs a '.pyx' extension.
35203520
<cython_script>.main() # Main() isn't automatically executed.
35213521
```
35223522

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,13 +1294,13 @@
12941294
<li><strong>Each item is printed on its own line if collection exceeds 'width' characters.</strong></li>
12951295
<li><strong>Nested collections that are 'depth' levels deep get printed as '…'.</strong></li>
12961296
</ul>
1297-
<div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><pre><code class="python language-python hljs">&lt;str&gt; = input(prompt=<span class="hljs-keyword">None</span>)
1297+
<div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><pre><code class="python language-python hljs">&lt;str&gt; = input([&lt;obj&gt;])
12981298
</code></pre></div>
12991299

13001300
<ul>
13011301
<li><strong>Reads a line from the user input or pipe if present (trailing newline gets stripped).</strong></li>
1302-
<li><strong>Prompt string is printed to the standard output before input is read.</strong></li>
1303-
<li><strong>Raises EOFError when user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.</strong></li>
1302+
<li><strong>If argument is passed, it gets printed to the standard output before input is read.</strong></li>
1303+
<li><strong>EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.</strong></li>
13041304
</ul>
13051305
<div><h2 id="commandlinearguments"><a href="#commandlinearguments" name="commandlinearguments">#</a>Command Line Arguments</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> sys
13061306
scripts_path = sys.argv[<span class="hljs-number">0</span>]
@@ -2858,7 +2858,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
28582858

28592859
<div><h2 id="appendix"><a href="#appendix" name="appendix">#</a>Appendix</h2><div><h3 id="cython">Cython</h3><p><strong>Library that compiles Python-like code into C.</strong></p><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install cython</span>
28602860
<span class="hljs-keyword">import</span> pyximport; pyximport.install() <span class="hljs-comment"># Module that runs imported Cython scripts.</span>
2861-
<span class="hljs-keyword">import</span> &lt;cython_script&gt; <span class="hljs-comment"># Script needs a '.pyx' extension.</span>
2861+
<span class="hljs-keyword">import</span> &lt;cython_script&gt; <span class="hljs-comment"># Script's filename needs a '.pyx' extension.</span>
28622862
&lt;cython_script&gt;.main() <span class="hljs-comment"># Main() isn't automatically executed.</span>
28632863
</code></pre></div></div>
28642864

0 commit comments

Comments
 (0)