From b00c3d99a65701e93152ce1f7fe67b48c22d8077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 10 Dec 2024 12:01:47 +0100 Subject: [PATCH] Input, Cython --- README.md | 8 ++++---- index.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 21caa40..654f3be 100644 --- a/README.md +++ b/README.md @@ -1531,11 +1531,11 @@ pprint(, width=80, depth=None, compact=False, sort_dicts=True) Input ----- ```python - = input(prompt=None) + = input([]) ``` * **Reads a line from the user input or pipe if present (trailing newline gets stripped).** -* **Prompt string is printed to the standard output before input is read.** -* **Raises EOFError when user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.** +* **If argument is passed, it gets printed to the standard output before input is read.** +* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.** Command Line Arguments @@ -3516,7 +3516,7 @@ Appendix ```python # $ pip3 install cython import pyximport; pyximport.install() # Module that runs imported Cython scripts. -import # Script needs a '.pyx' extension. +import # Script's filename needs a '.pyx' extension. .main() # Main() isn't automatically executed. ``` diff --git a/index.html b/index.html index 64862d9..48a2873 100644 --- a/index.html +++ b/index.html @@ -1294,13 +1294,13 @@ pprint(<collection>, width=80, depth=Each item is printed on its own line if collection exceeds 'width' characters.
  • Nested collections that are 'depth' levels deep get printed as '…'.
  • -

    #Input

    <str> = input(prompt=None)
    +

    #Input

    <str> = input([<obj>])
     
    • Reads a line from the user input or pipe if present (trailing newline gets stripped).
    • -
    • Prompt string is printed to the standard output before input is read.
    • -
    • Raises EOFError when user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.
    • +
    • If argument is passed, it gets printed to the standard output before input is read.
    • +
    • EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.

    #Command Line Arguments

    import sys
     scripts_path = sys.argv[0]
    @@ -2858,7 +2858,7 @@ px.line(df, x='Date', y=#Appendix

    Cython

    Library that compiles Python-like code into C.

    # $ pip3 install cython
     import pyximport; pyximport.install()  # Module that runs imported Cython scripts.
    -import <cython_script>                 # Script needs a '.pyx' extension.
    +import <cython_script>                 # Script's filename needs a '.pyx' extension.
     <cython_script>.main()                 # Main() isn't automatically executed.