Mypy 1.8.0 Documentationas “a list of strings” or “an iterable of ints”? For example, to indicate that some function can accept a list of strings, use the list[str] type (Python 3.9 and later): def greet_all(names: list[str]) incompatible types The list type is an example of something called a generic type: it can accept one or more type parameters. In this case, we parameterized list by writing list[str]. This lets mypy know perhaps a little too rigid. After all, there’s no reason why this function must accept specifically a list – it would run just fine if you were to pass in a tuple, a set, or any other custom iterable. You0 码力 | 234 页 | 902.89 KB | 1 年前3
Mypy 1.10.0+dev DocumentationConfiguring and running mypy Running mypy and managing imports Specifying code to be checked Reading a list of files from a file Mapping file paths to modules How mypy handles imports Missing imports How imports application Extending mypy using plugins Configuring mypy to use plugins High-level overview Current list of plugin hooks Useful tools Automatic stub generation (stubgen) Specifying what to stub Specifying [type-var] Check uses of various operators [operator] Check indexing operations [index] Check list items [list-item] Check dict items [dict-item] Check TypedDict items [typeddict-item] Check TypedDict Keys0 码力 | 318 页 | 270.84 KB | 1 年前3
Mypy 1.8.0 DocumentationConfiguring and running mypy Running mypy and managing imports Specifying code to be checked Reading a list of files from a file Mapping file paths to modules How mypy handles imports Missing imports How imports application Extending mypy using plugins Configuring mypy to use plugins High-level overview Current list of plugin hooks Useful tools Automatic stub generation (stubgen) Specifying what to stub Specifying [type-var] Check uses of various operators [operator] Check indexing operations [index] Check list items [list-item] Check dict items [dict-item] Check TypedDict items [typeddict-item] Check TypedDict Keys0 码力 | 318 页 | 271.55 KB | 1 年前3
Mypy 1.10.0+dev Documentationas “a list of strings” or “an iterable of ints”? For example, to indicate that some function can accept a list of strings, use the list[str] type (Python 3.9 and later): def greet_all(names: list[str]) incompatible types The list type is an example of something called a generic type: it can accept one or more type parameters. In this case, we parameterized list by writing list[str]. This lets mypy know perhaps a little too rigid. After all, there’s no reason why this function must accept specifically a list – it would run just fine if you were to pass in a tuple, a set, or any other custom iterable. You0 码力 | 234 页 | 913.89 KB | 1 年前3
PyWebIO v1.8.0 DocumentationPyWebIO uses input group to get multiple inputs in a single form. pywebio.input.input_group() accepts a list of single input function call as parameter, and returns a dictionary with the name of the single input output widgets that can accept put_xxx() calls. For a full list of functions that accept put_xxx() calls as content, see Output functions list Context Manager Some output functions that accept put_xxx() ['Commodity', 'Price'], ['Apple', '5.5'], ['Banana', '7'], ]) For a full list of functions that support context manager, see Output functions list Click Callback As we can see from the above, the interaction of0 码力 | 118 页 | 1.40 MB | 1 年前3
PyWebIO v1.8.2 DocumentationPyWebIO uses input group to get multiple inputs in a single form. pywebio.input.input_group() accepts a list of single input function call as parameter, and returns a dictionary with the name of the single input output widgets that can accept put_xxx() calls. For a full list of functions that accept put_xxx() calls as content, see Output functions list Context Manager Some output functions that accept put_xxx() ['Commodity', 'Price'], ['Apple', '5.5'], ['Banana', '7'], ]) For a full list of functions that support context manager, see Output functions list Click Callback As we can see from the above, the interaction of0 码力 | 118 页 | 1.40 MB | 1 年前3
PyWebIO v1.8.1 DocumentationPyWebIO uses input group to get multiple inputs in a single form. pywebio.input.input_group() accepts a list of single input function call as parameter, and returns a dictionary with the name of the single input output widgets that can accept put_xxx() calls. For a full list of functions that accept put_xxx() calls as content, see Output functions list Context Manager Some output functions that accept put_xxx() ['Commodity', 'Price'], ['Apple', '5.5'], ['Banana', '7'], ]) For a full list of functions that support context manager, see Output functions list Click Callback As we can see from the above, the interaction of0 码力 | 118 页 | 1.40 MB | 1 年前3
peewee Documentation
Release 3.5.03.0 has been released (you are looking at the 3.0 documentation). To see a list of backwards-incompatible changes, see the list of changes. Peewee is a simple and small ORM. It has few (but expressive) Peewee’s source code hosted on GitHub [https://github.com/coleifer/peewee]. New to peewee? Here is a list of documents you might find most helpful when getting started: Quickstart guide – this guide covers records Let’s list all the people in the database: for person in Person.select(): print(person.name, person.is_relative) # prints: # Bob True # Grandma L. True # Herb False Let’s list all the cats0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.00 has been released (you are looking at the 3.0 documentation). To see a list of backwards- incompatible changes, see the list of changes. Peewee is a simple and small ORM. It has few (but expressive) schema migrations, and much more). Peewee’s source code hosted on GitHub. New to peewee? Here is a list of documents you might find most helpful when getting started: • Quickstart guide – this guide covers records Let’s list all the people in the database: for person in Person.select(): print(person.name, person.is_relative) # prints: # Bob True # Grandma L. True # Herb False Let’s list all the cats and0 码力 | 282 页 | 1.02 MB | 1 年前3
PyWebIO v1.8.1 Documentationleast pywebio.input — Get input from web browser Functions list Functions doc pywebio.output — Make output to web browser Functions list Output Scope Content Outputting Other Interactions Layout and new in PyWebIO 0.3 What’s new in PyWebIO 0.2 Battery pywebio_battery — PyWebIO battery Functions list Implement Doc Server-Client communication protocol Command Event Indices and tables Index Module PyWebIO uses input group to get multiple inputs in a single form. pywebio.input.input_group() accepts a list of single input function call as parameter, and returns a dictionary with the name of the single input0 码力 | 160 页 | 7.47 MB | 1 年前3
共 532 条
- 1
- 2
- 3
- 4
- 5
- 6
- 54













