From 72f7bf1539257bdcd1d2364cacd532c25a566271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 6 Feb 2020 05:49:02 +0100 Subject: [PATCH] Grammar fixes --- README.md | 10 +++++----- index.html | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 53ba755..2cf3cde 100644 --- a/README.md +++ b/README.md @@ -378,7 +378,7 @@ import re ### Special Sequences * **By default digits, whitespaces and alphanumerics from all alphabets are matched, unless `'flags=re.ASCII'` argument is used.** -* **Use capital letter for negation.** +* **Use a capital letter for negation.** ```python '\d' == '[0-9]' # Matches any digit. '\w' == '[a-zA-Z0-9_]' # Matches any alphanumeric. @@ -1686,14 +1686,14 @@ import os = os.popen('').read() ``` -#### Sends '1 + 1' to calculator and captures its output: +#### Sends '1 + 1' to a calculator and captures its output: ```python >>> from subprocess import run >>> run('bc', input='1 + 1\n', capture_output=True, encoding='utf-8') CompletedProcess(args='bc', returncode=0, stdout='2\n', stderr='') ``` -#### Sends 'test.in' to calculator running in standard mode and saves its output to 'test.out': +#### Sends 'test.in' to a calculator running in standard mode and saves its output to 'test.out': ```python >>> from shlex import split >>> os.popen('echo 1 + 1 > test.in') @@ -1952,7 +1952,7 @@ b'\x00\x01\x00\x02\x00\x00\x00\x03' * **`'<'` - little-endian** * **`'>'` - big-endian (also `'!'`)** -#### Integer types. Use capital letter for unsigned type. Standard sizes are in brackets: +#### Integer types. Use a capital letter for unsigned type. Standard sizes are in brackets: * **`'x'` - pad byte** * **`'b'` - char (1)** * **`'h'` - short (2)** @@ -2575,7 +2575,7 @@ indexes = .argmin(axis) ``` * **Shape is a tuple of dimension sizes.** -* **Axis is the index of a dimension that gets collapsed. Leftmost dimension has index 0.** +* **Axis is the index of a dimension that gets collapsed. The leftmost dimension has index 0.** ### Indexing ```bash diff --git a/index.html b/index.html index 5813bbf..9307a97 100644 --- a/index.html +++ b/index.html @@ -483,7 +483,7 @@ to_exclusive = <range>.stop

Special Sequences

  • By default digits, whitespaces and alphanumerics from all alphabets are matched, unless 'flags=re.ASCII' argument is used.
  • -
  • Use capital letter for negation.
  • +
  • Use a capital letter for negation.
'\d' == '[0-9]'                                # Matches any digit.
 '\w' == '[a-zA-Z0-9_]'                         # Matches any alphanumeric.
 '\s' == '[ \t\n\r\f\v]'                        # Matches any whitespace.
@@ -1529,12 +1529,12 @@ shutil.rmtree(<path>)               # Deletes n
 <str> = os.popen('<shell_command>').read()
 
-

Sends '1 + 1' to calculator and captures its output:

>>> from subprocess import run
+

Sends '1 + 1' to a calculator and captures its output:

>>> from subprocess import run
 >>> run('bc', input='1 + 1\n', capture_output=True, encoding='utf-8')
 CompletedProcess(args='bc', returncode=0, stdout='2\n', stderr='')
 
-

Sends 'test.in' to calculator running in standard mode and saves its output to 'test.out':

>>> from shlex import split
+

Sends 'test.in' to a calculator running in standard mode and saves its output to 'test.out':

>>> from shlex import split
 >>> os.popen('echo 1 + 1 > test.in')
 >>> run(split('bc -s'), stdin=open('test.in'), stdout=open('test.out', 'w'))
 CompletedProcess(args=['bc', '-s'], returncode=0)
@@ -1728,14 +1728,14 @@ db = connector.connect(host=<str>, user=<str>, password=<str>,
 
  • '=' - native byte order
  • '<' - little-endian
  • '>' - big-endian (also '!')
  • -

    Integer types. Use capital letter for unsigned type. Standard sizes are in brackets:

      +

    Integer types. Use a capital letter for unsigned type. Standard sizes are in brackets:

    • 'x' - pad byte
    • 'b' - char (1)
    • 'h' - short (2)
    • 'i' - int (4)
    • 'l' - long (4)
    • 'q' - long long (8)
    • -

    Floating point types:

      +

    Floating point types:

    • 'f' - float (4)
    • 'd' - double (8)
    @@ -2204,7 +2204,7 @@ indexes = <array>.argmin(axis)
    • Shape is a tuple of dimension sizes.
    • -
    • Axis is the index of a dimension that gets collapsed. Leftmost dimension has index 0.
    • +
    • Axis is the index of a dimension that gets collapsed. The leftmost dimension has index 0.

    Indexing

    <el>       = <2d_array>[0, 0]        # First element.
     <1d_view>  = <2d_array>[0]           # First row.