Skip to content

Commit ab81154

Browse files
committed
[mypyc] Add missing primitive documentation
Some recently added primitives weren't mentioned in docs.
1 parent 0e6cfd4 commit ab81154

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

mypyc/doc/bytes_operations.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Operators
1818
* Concatenation (``b1 + b2``)
1919
* Indexing (``b[n]``)
2020
* Slicing (``b[n:m]``, ``b[n:]``, ``b[:m]``)
21+
* Repetition (``b * n``, ``n * b``)
2122
* Comparisons (``==``, ``!=``)
2223

2324
.. _bytes-methods:
@@ -28,7 +29,10 @@ Methods
2829
* ``b.decode()``
2930
* ``b.decode(encoding: str)``
3031
* ``b.decode(encoding: str, errors: str)``
32+
* ``b1.endswith(b2: bytes)``
3133
* ``b.join(x: Iterable)``
34+
* ``b1.startswith(b2: bytes)``
35+
* ``b.translate(table: bytes)``
3236

3337
.. note::
3438

mypyc/doc/int_operations.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ and the ``int`` operand is coerced to the native integer type::
143143
b = 1 - x
144144
# Similarly, type of "b" is "i64"
145145

146+
Methods
147+
-------
148+
149+
* ``n.bit_length()``
150+
* ``n.to_bytes(length: int, byteorder: str)``
151+
* ``n.to_bytes(length: int, byteorder: str, signed: bool)``
152+
146153
Statements
147154
----------
148155

mypyc/doc/str_operations.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Operators
2121
* Concatenation (``s1 + s2``)
2222
* Indexing (``s[n]``; also ``ord(s[n])``, which avoids the temporary length-1 string)
2323
* Slicing (``s[n:m]``, ``s[n:]``, ``s[:m]``)
24+
* Repetition (``s * n``, ``n * s``)
2425
* Comparisons (``==``, ``!=``)
2526
* Augmented assignment (``s1 += s2``)
2627
* Containment (``s1 in s2``)

0 commit comments

Comments
 (0)