Mypy 1.8.0 Documentationannotations 23 Mypy Documentation, Release 1.8.0 # mypy: ignore-errors # This is a test file, skipping type checking in it. import unittest ... You can also specify per-module configuration options inferred type of x is just int here. return x + 1 Mypy will infer the type of x to be int in the else block due to the check against None in the if condition. Other supported checks for guarding against a f(x: int) -> int: if x == 0: return x stop() return 'whatever works' # No error in an unreachable block In earlier Python versions you need to install typing_extensions using pip to use NoReturn in your0 码力 | 234 页 | 902.89 KB | 1 年前3
Mypy 1.10.0+dev Documentationadding a # mypy: ignore-errors at the top of the file: # mypy: ignore-errors # This is a test file, skipping type checking in it. import unittest ... You can also specify per-module configuration options of x is just int here. return x + 1 Mypy will infer the type of x to be int in the else block due to the check against None in the if condition. Other supported checks for guarding against a if x == 0: return x stop() return 'whatever works' # No error in an unreachable block In earlier Python versions you need to install typing_extensions using pip to use NoReturn [https://docs0 码力 | 318 页 | 270.84 KB | 1 年前3
Mypy 1.8.0 Documentationadding a # mypy: ignore-errors at the top of the file: # mypy: ignore-errors # This is a test file, skipping type checking in it. import unittest ... You can also specify per-module configuration options of x is just int here. return x + 1 Mypy will infer the type of x to be int in the else block due to the check against None in the if condition. Other supported checks for guarding against a if x == 0: return x stop() return 'whatever works' # No error in an unreachable block In earlier Python versions you need to install typing_extensions using pip to use NoReturn [https://docs0 码力 | 318 页 | 271.55 KB | 1 年前3
Mypy 1.10.0+dev Documentationadding a # mypy: ignore-errors at the top of the file: # mypy: ignore-errors # This is a test file, skipping type checking in it. import unittest ... You can also specify per-module configuration options inferred type of x is just int here. return x + 1 Mypy will infer the type of x to be int in the else block due to the check against None in the if condition. Other supported checks for guarding against a f(x: int) -> int: if x == 0: return x stop() return 'whatever works' # No error in an unreachable block In earlier Python versions you need to install typing_extensions using pip to use NoReturn in your0 码力 | 234 页 | 913.89 KB | 1 年前3
Conda 23.5.x Documentationcollections.abc.Iterable[conda.plugins.types.CondaSolver] Register solvers in conda. Example: .. code-block:: python import logging from conda import plugins from conda.core import solve log = logging.getLogger(__name__) Iterable[conda.plugins.types.CondaSubcommand] Register external subcommands in conda. Example: .. code-block:: python from conda import plugins def example_command(args): print("This is an example command Iterable[conda.plugins.types.CondaVirtualPackage] Register virtual packages in Conda. Example: .. code-block:: python from conda import plugins @plugins.hookimpl def conda_virtual_packages(): yield plugins0 码力 | 370 页 | 3.11 MB | 8 月前3
Conda 23.3.x Documentationvariable list. (#10665) • Improve CLI warning about updating conda. (#11300) • Conda’s initialize block in the user’s profiles will check whether the conda executable exists before calling the conda hook d scripts (#8464) • Fix usage of deprecated collections ABCs (#) • fix tcsh/csh initialization block (#8591) • fix missing CWD display in powershell prompt (#8596) • wrap_subprocess_call: fallback better use of sphinx admonitions (notes, warnings) for better accentuation in docs (#8348) • improve skipping CI builds when only docs changes are involved (#8336) 7.43.3 Contributors • @albertmichaelj •0 码力 | 370 页 | 2.94 MB | 8 月前3
Python 标准库参考指南 2.7.18 use the with statement. For example, the following code will automatically close f when the with block is exited: from __future__ import with_statement # This isn't required in Python 2.6 with open("hello 如果你只对两个序列相匹配的位置感兴趣,则 get_matching_blocks() 就很方便: >>> for block in s.get_matching_blocks(): ... print "a[%d] and b[%d] match for %d elements" % block a[0] and b[0] match for 8 elements a[8] and b[17] match sets the upperbound limit on the number of items that can be placed in the queue. Insertion will block once this size has been reached, until queue items are consumed. If maxsize is less than or equal0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 use the with statement. For example, the following code will automatically close f when the with block is exited: from __future__ import with_statement # This isn't required in Python 2.6 with open("hello 如果你只对两个序列相匹配的位置感兴趣,则 get_matching_blocks() 就很方便: >>> for block in s.get_matching_blocks(): ... print "a[%d] and b[%d] match for %d elements" % block a[0] and b[0] match for 8 elements a[8] and b[17] match sets the upperbound limit on the number of items that can be placed in the queue. Insertion will block once this size has been reached, until queue items are consumed. If maxsize is less than or equal0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 use the with statement. For example, the following code will automatically close f when the with block is exited: from __future__ import with_statement # This isn't required in Python 2.6 with open("hello 如果你只对两个序列相匹配的位置感兴趣,则 get_matching_blocks() 就很方便: >>> for block in s.get_matching_blocks(): ... print "a[%d] and b[%d] match for %d elements" % block a[0] and b[0] match for 8 elements a[8] and b[17] match sets the upperbound limit on the number of items that can be placed in the queue. Insertion will block once this size has been reached, until queue items are consumed. If maxsize is less than or equal0 码力 | 1552 页 | 7.42 MB | 9 月前3
Conda 25.1.x Documentationthe output folder corresponds to the same directory as root-dir: the root build directory. .. code-block:: yaml conda-build: output_folder: conda-bld pkg_version: Specify conda-build package version variable list. (#10665) • Improve CLI warning about updating conda. (#11300) • Conda’s initialize block in the user’s profiles will check whether the conda executable exists before calling the conda hook d scripts (#8464) • Fix usage of deprecated collections ABCs (#) • fix tcsh/csh initialization block (#8591) • fix missing CWD display in powershell prompt (#8596) • wrap_subprocess_call: fallback0 码力 | 822 页 | 5.20 MB | 8 月前3
共 477 条
- 1
- 2
- 3
- 4
- 5
- 6
- 48













