Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions mypyc/doc/float_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ Construction
------------

* Float literal
* ``float(string)``

Functions
---------

* ``abs(f)``
31 changes: 7 additions & 24 deletions mypyc/doc/int_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,16 @@ Construction
Operators
---------

Arithmetic:

* ``x + y``
* ``x - y``
* ``x * y``
* ``x // y``
* ``x % y``
* ``-x``

Comparisons:

* ``x == y``, ``x != y``
* ``x < y``, ``x <= y``, ``x > y``, ``x >= y``
* Arithmetic (``+``, ``-``, ``*``, ``//``, ``%``)
* Bitwise operations (``&``, ``|``, ``^``, ``<<``, ``>>``, ``~``)
* Comparisons (``==``, ``!=``, ``<``, etc.)
* Augmented assignment (``x += y``, etc.)

Statements
----------

For loop over range:

* ``for x in range(end):``
* ``for x in range(start, end):``
* ``for x in range(start, end, step):``

Augmented assignment:

* ``x += y``
* ``x -= y``
* ``x *= y``
* ``x //= y``
* ``x %= y``
* ``for x in range(end)``
* ``for x in range(start, end)``
* ``for x in range(start, end, step)``
27 changes: 7 additions & 20 deletions mypyc/doc/str_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,18 @@ Construction
Operators
---------

Concatenation:

* ``s1 + s2``

Indexing:

* ``s[n]`` (integer index)

Slicing:

* ``s[n:m]``, ``s[n:]``, ``s[:m]``

Comparisons:

* ``s1 == s2``, ``s1 != s2``

Statements
----------

* ``s1 += s2``
* Concatenation (``s1 + s2``)
* Indexing (``s[n]``)
* Slicing (``s[n:m]``, ``s[n:]``, ``s[:m]``)
* Comparisons (``==``, ``!=``)
* Augmented assignment (``s1 += s2``)

Methods
-------

* ``s1.endswith(s2: str)``
* ``s.join(x: Iterable)``
* ``s.split()``
* ``s.split(sep: str)``
* ``s.split(sep: str, maxsplit: int)``
* ``s1.startswith(s2: str)``