Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbf95ad

Browse files
committed
Deploying to gh-pages from @ e0ffdb0 πŸš€
1 parent e5b8830 commit bbf95ad

File tree

545 files changed

+2697
-46165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

545 files changed

+2697
-46165
lines changed

β€Ž.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 50af0d660d50b5786c94ea85db14feea
3+
config: 3a2f0796ccfa88958b5811059db53f09
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

β€Ž_sources/howto/descriptor.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ Invocation from super
787787
---------------------
788788

789789
The logic for super's dotted lookup is in the :meth:`__getattribute__` method for
790-
object returned by :class:`super()`.
790+
object returned by :func:`super`.
791791

792792
A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__.__mro__``
793793
for the base class ``B`` immediately following ``A`` and then returns

β€Ž_sources/library/ast.rst.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,13 @@ Statements
883883
An assignment with a type annotation. ``target`` is a single node and can
884884
be a :class:`Name`, a :class:`Attribute` or a :class:`Subscript`.
885885
``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name`
886-
node. ``value`` is a single optional node. ``simple`` is a boolean integer
887-
set to True for a :class:`Name` node in ``target`` that do not appear in
888-
between parenthesis and are hence pure names and not expressions.
886+
node. ``value`` is a single optional node.
887+
888+
``simple`` is always either 0 (indicating a "complex" target) or 1
889+
(indicating a "simple" target). A "simple" target consists solely of a
890+
:class:`Name` node that does not appear between parentheses; all other
891+
targets are considered complex. Only simple targets appear in
892+
the :attr:`__annotations__` dictionary of modules and classes.
889893

890894
.. doctest::
891895

β€Ž_sources/library/collections.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The class can be used to simulate nested scopes and is useful in templating.
9999
:func:`super` function. A reference to ``d.parents`` is equivalent to:
100100
``ChainMap(*d.maps[1:])``.
101101

102-
Note, the iteration order of a :class:`ChainMap()` is determined by
102+
Note, the iteration order of a :class:`ChainMap` is determined by
103103
scanning the mappings last to first::
104104

105105
>>> baseline = {'music': 'bach', 'art': 'rembrandt'}

β€Ž_sources/library/datetime.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ There is one more :class:`tzinfo` method that a subclass may wish to override:
21062106

21072107
.. method:: tzinfo.fromutc(dt)
21082108

2109-
This is called from the default :class:`datetime.astimezone()`
2109+
This is called from the default :meth:`datetime.astimezone`
21102110
implementation. When called from that, ``dt.tzinfo`` is *self*, and *dt*'s
21112111
date and time data are to be viewed as expressing a UTC time. The purpose
21122112
of :meth:`fromutc` is to adjust the date and time data, returning an

β€Ž_sources/library/decimal.rst.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,48 @@ Decimal objects
897897
:const:`Rounded`. If given, applies *rounding*; otherwise, uses the
898898
rounding method in either the supplied *context* or the current context.
899899

900+
Decimal numbers can be rounded using the :func:`.round` function:
901+
902+
.. describe:: round(number)
903+
.. describe:: round(number, ndigits)
904+
905+
If *ndigits* is not given or ``None``,
906+
returns the nearest :class:`int` to *number*,
907+
rounding ties to even, and ignoring the rounding mode of the
908+
:class:`Decimal` context. Raises :exc:`OverflowError` if *number* is an
909+
infinity or :exc:`ValueError` if it is a (quiet or signaling) NaN.
910+
911+
If *ndigits* is an :class:`int`, the context's rounding mode is respected
912+
and a :class:`Decimal` representing *number* rounded to the nearest
913+
multiple of ``Decimal('1E-ndigits')`` is returned; in this case,
914+
``round(number, ndigits)`` is equivalent to
915+
``self.quantize(Decimal('1E-ndigits'))``. Returns ``Decimal('NaN')`` if
916+
*number* is a quiet NaN. Raises :class:`InvalidOperation` if *number*
917+
is an infinity, a signaling NaN, or if the length of the coefficient after
918+
the quantize operation would be greater than the current context's
919+
precision. In other words, for the non-corner cases:
920+
921+
* if *ndigits* is positive, return *number* rounded to *ndigits* decimal
922+
places;
923+
* if *ndigits* is zero, return *number* rounded to the nearest integer;
924+
* if *ndigits* is negative, return *number* rounded to the nearest
925+
multiple of ``10**abs(ndigits)``.
926+
927+
For example::
928+
929+
>>> from decimal import Decimal, getcontext, ROUND_DOWN
930+
>>> getcontext().rounding = ROUND_DOWN
931+
>>> round(Decimal('3.75')) # context rounding ignored
932+
4
933+
>>> round(Decimal('3.5')) # round-ties-to-even
934+
4
935+
>>> round(Decimal('3.75'), 0) # uses the context rounding
936+
Decimal('3')
937+
>>> round(Decimal('3.75'), 1)
938+
Decimal('3.7')
939+
>>> round(Decimal('3.75'), -1)
940+
Decimal('0E+1')
941+
900942

901943
.. _logical_operands_label:
902944

β€Ž_sources/library/enum.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ Data Types
517517

518518
``Flag`` is the same as :class:`Enum`, but its members support the bitwise
519519
operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*);
520-
the results of those operators are members of the enumeration.
520+
the results of those operations are (aliases of) members of the enumeration.
521521

522522
.. method:: __contains__(self, value)
523523

β€Ž_sources/library/fileinput.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Lines are returned with any newlines intact, which means that the last line in
4747
a file may not have one.
4848

4949
You can control how files are opened by providing an opening hook via the
50-
*openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The
50+
*openhook* parameter to :func:`fileinput.input` or :func:`FileInput`. The
5151
hook must be a function that takes two arguments, *filename* and *mode*, and
5252
returns an accordingly opened file-like object. If *encoding* and/or *errors*
5353
are specified, they will be passed to the hook as additional keyword arguments.

β€Ž_sources/library/ipaddress.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ The module also provides the following module level functions:
983983
.. function:: collapse_addresses(addresses)
984984

985985
Return an iterator of the collapsed :class:`IPv4Network` or
986-
:class:`IPv6Network` objects. *addresses* is an iterator of
986+
:class:`IPv6Network` objects. *addresses* is an :term:`iterable` of
987987
:class:`IPv4Network` or :class:`IPv6Network` objects. A :exc:`TypeError` is
988988
raised if *addresses* contains mixed version objects.
989989

0 commit comments

Comments
Β (0)