Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bed188f commit 9ed7bb4Copy full SHA for 9ed7bb4
1 file changed
docs/source/duck_type_compatibility.rst
@@ -9,6 +9,8 @@ supported for a small set of built-in types:
9
* ``int`` is duck type compatible with ``float`` and ``complex``.
10
* ``float`` is duck type compatible with ``complex``.
11
* ``bytearray`` and ``memoryview`` are duck type compatible with ``bytes``.
12
+ (this will be disabled by default in **mypy 2.0**, and currently can be
13
+ disabled with :option:`--strict-bytes <mypy --strict-bytes>`.)
14
15
For example, mypy considers an ``int`` object to be valid whenever a
16
``float`` object is expected. Thus code like this is nice and clean
0 commit comments