File: bool_operations.rst

package info (click to toggle)
mypy 1.15.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 20,576 kB
  • sloc: python: 105,159; cpp: 11,380; ansic: 6,629; makefile: 247; sh: 20
file content (27 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.. _bool-ops:

Native boolean operations
=========================

Operations on ``bool`` values that are listed here have fast,
optimized implementations.

Construction
------------

* ``True``
* ``False``
* ``bool(obj)``

Operators
---------

* ``b1 and b2``
* ``b1 or b2``
* ``not b``

Functions
---------

* ``any(expr for ... in ...)``
* ``all(expr for ... in ...)``