Mypy 1.8.0 Documentation
variable type Complex type tests Python version and system platform checks Displaying the type of an expression Silencing linters Covariant subtyping of mutable protocol members is rejected Dealing with conflicting components due to missing imports [no-any- unimported] Check that statement or expression is unreachable [unreachable] Check that expression is redundant [redundant-expr] Warn about variables that are defined only only in some execution paths [possibly-undefined] Check that expression is not implicitly true in boolean context [truthy- bool] Check that iterable is not implicitly true in boolean context [truthy- iterable]0 码力 | 318 页 | 271.55 KB | 1 年前3Mypy 1.10.0+dev Documentation
variable type Complex type tests Python version and system platform checks Displaying the type of an expression Silencing linters Covariant subtyping of mutable protocol members is rejected Dealing with conflicting components due to missing imports [no-any- unimported] Check that statement or expression is unreachable [unreachable] Check that expression is redundant [redundant-expr] Warn about variables that are defined only only in some execution paths [possibly-undefined] Check that expression is not implicitly true in boolean context [truthy- bool] Check that iterable is not implicitly true in boolean context [truthy- iterable]0 码力 | 318 页 | 270.84 KB | 1 年前3Mypy 1.8.0 Documentation
dynamically typed functions. This means that with a few exceptions, mypy will not report any errors with regular unannotated Python. This is the case even if you misuse the function! def greeting(name): return with an intimate knowledge of the Python standard library. For example, here is a function which uses the Path object from the pathlib standard library module: from pathlib import Path def load_template(template_path: a third party library you use declares support for type checking, mypy will type check your use of that library based on the type hints it contains. However, if the third party library does not have type0 码力 | 234 页 | 902.89 KB | 1 年前3Mypy 1.10.0+dev Documentation
dynamically typed functions. This means that with a few exceptions, mypy will not report any errors with regular unannotated Python. This is the case even if you misuse the function! def greeting(name): return with an intimate knowledge of the Python standard library. For example, here is a function which uses the Path object from the pathlib standard library module: from pathlib import Path def load_template(template_path: a third party library you use declares support for type checking, mypy will type check your use of that library based on the type hints it contains. However, if the third party library does not have type0 码力 | 234 页 | 913.89 KB | 1 年前3Django 5.1 Documentation
basic logging call Customize logging configuration How to create CSV output Using the Python CSV library Using the template system Other text-based formats How to create PDF files Install ReportLab Write Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view, which django.utils import timezone, to reference Python’s standard datetime [https://docs.python.org/3/library/datetime.html#module-datetime] module and Django’s time-zone-related utilities in django.utils.timezone0 码力 | 3513 页 | 3.17 MB | 1 年前3Django 5.1.2 Documentation
basic logging call Customize logging configuration How to create CSV output Using the Python CSV library Using the template system Other text-based formats How to create PDF files Install ReportLab Write Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view, which django.utils import timezone, to reference Python’s standard datetime [https://docs.python.org/3/library/datetime.html#module-datetime] module and Django’s time-zone-related utilities in django.utils.timezone0 码力 | 3519 页 | 3.17 MB | 1 年前3Django 5.0.x Documentation
basic logging call Customize logging configuration How to create CSV output Using the Python CSV library Using the template system Other text-based formats How to create PDF files Install ReportLab Write Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view, which django.utils import timezone, to reference Python’s standard datetime [https://docs.python.org/3/library/datetime.html#module-datetime] module and Django’s time-zone-related utilities in django.utils.timezone0 码力 | 3407 页 | 3.21 MB | 1 年前3Scrapy 1.4 Documentation
sources using extended CSS selectors and XPath expressions, with helper methods to extract using regular expressions. An interactive shell console (IPython aware) for trying out the CSS and XPath expressions efficient XML and HTML parser parsel [https://pypi.python.org/pypi/parsel], an HTML/XML data extraction library written on top of lxml, w3lib [https://pypi.python.org/pypi/w3lib], a multi-purpose helper for dealing Besides the extract() and extract_first() methods, you can also use the re() method to extract using regular expressions: >>> response.css('title::text').re(r'Quotes.*') ['Quotes to Scrape'] >>> response.css('title::text')0 码力 | 394 页 | 589.10 KB | 1 年前3Django 2.2.x Documentation
Install the core Django tables Test and tweak Outputting CSV with Django Using the Python CSV library Using the template system Other text-based formats Outputting PDFs with Django Install ReportLab Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view, which by installing our new django-polls package. Installing as a user library The following steps install django-polls as a user library. Per-user installs have a lot of advantages over installing the package0 码力 | 2915 页 | 2.83 MB | 1 年前3Django 2.1.x Documentation
Install the core Django tables Test and tweak Outputting CSV with Django Using the Python CSV library Using the template system Other text-based formats Outputting PDFs with Django Install ReportLab Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view, which by installing our new django-polls package. Installing as a user library The following steps install django-polls as a user library. Per-user installs have a lot of advantages over installing the package0 码力 | 2790 页 | 2.71 MB | 1 年前3
共 541 条
- 1
- 2
- 3
- 4
- 5
- 6
- 55