Skip to content

Commit 774cf6f

Browse files
committed
Update translation build
1 parent e4ab191 commit 774cf6f

519 files changed

Lines changed: 2544 additions & 2555 deletions

File tree

Some content is hidden

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

docs/_sources/faq/general.rst.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ What is Python?
1717

1818
Python is an interpreted, interactive, object-oriented programming language. It
1919
incorporates modules, exceptions, dynamic typing, very high level dynamic data
20-
types, and classes. Python combines remarkable power with very clear syntax.
21-
It has interfaces to many system calls and libraries, as well as to various
22-
window systems, and is extensible in C or C++. It is also usable as an
23-
extension language for applications that need a programmable interface.
24-
Finally, Python is portable: it runs on many Unix variants, on the Mac, and on
25-
Windows 2000 and later.
20+
types, and classes. It supports multiple programming paradigms beyond
21+
object-oriented programming, such as procedural and functional programming.
22+
Python combines remarkable power with very clear syntax. It has interfaces to
23+
many system calls and libraries, as well as to various window systems, and is
24+
extensible in C or C++. It is also usable as an extension language for
25+
applications that need a programmable interface. Finally, Python is portable:
26+
it runs on many Unix variants including Linux and macOS, and on Windows.
2627

2728
To find out more, start with :ref:`tutorial-index`. The `Beginner's Guide to
2829
Python <https://wiki.python.org/moin/BeginnersGuide>`_ links to other

docs/_sources/library/decimal.rst.txt

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,67 +2130,17 @@ Q. Is the CPython implementation fast for large numbers?
21302130
A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of
21312131
the decimal module integrate the high speed `libmpdec
21322132
<https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html>`_ library for
2133-
arbitrary precision correctly-rounded decimal floating point arithmetic [#]_.
2133+
arbitrary precision correctly-rounded decimal floating point arithmetic.
21342134
``libmpdec`` uses `Karatsuba multiplication
21352135
<https://en.wikipedia.org/wiki/Karatsuba_algorithm>`_
21362136
for medium-sized numbers and the `Number Theoretic Transform
21372137
<https://en.wikipedia.org/wiki/Discrete_Fourier_transform_(general)#Number-theoretic_transform>`_
2138-
for very large numbers.
2138+
for very large numbers. However, to realize this performance gain, the
2139+
context needs to be set for unrounded calculations.
21392140

2140-
The context must be adapted for exact arbitrary precision arithmetic. :attr:`Emin`
2141-
and :attr:`Emax` should always be set to the maximum values, :attr:`clamp`
2142-
should always be 0 (the default). Setting :attr:`prec` requires some care.
2141+
>>> c = getcontext()
2142+
>>> c.prec = MAX_PREC
2143+
>>> c.Emax = MAX_EMAX
2144+
>>> c.Emin = MIN_EMIN
21432145

2144-
The easiest approach for trying out bignum arithmetic is to use the maximum
2145-
value for :attr:`prec` as well [#]_::
2146-
2147-
>>> setcontext(Context(prec=MAX_PREC, Emax=MAX_EMAX, Emin=MIN_EMIN))
2148-
>>> x = Decimal(2) ** 256
2149-
>>> x / 128
2150-
Decimal('904625697166532776746648320380374280103671755200316906558262375061821325312')
2151-
2152-
2153-
For inexact results, :attr:`MAX_PREC` is far too large on 64-bit platforms and
2154-
the available memory will be insufficient::
2155-
2156-
>>> Decimal(1) / 3
2157-
Traceback (most recent call last):
2158-
File "<stdin>", line 1, in <module>
2159-
MemoryError
2160-
2161-
On systems with overallocation (e.g. Linux), a more sophisticated approach is to
2162-
adjust :attr:`prec` to the amount of available RAM. Suppose that you have 8GB of
2163-
RAM and expect 10 simultaneous operands using a maximum of 500MB each::
2164-
2165-
>>> import sys
2166-
>>>
2167-
>>> # Maximum number of digits for a single operand using 500MB in 8-byte words
2168-
>>> # with 19 digits per word (4-byte and 9 digits for the 32-bit build):
2169-
>>> maxdigits = 19 * ((500 * 1024**2) // 8)
2170-
>>>
2171-
>>> # Check that this works:
2172-
>>> c = Context(prec=maxdigits, Emax=MAX_EMAX, Emin=MIN_EMIN)
2173-
>>> c.traps[Inexact] = True
2174-
>>> setcontext(c)
2175-
>>>
2176-
>>> # Fill the available precision with nines:
2177-
>>> x = Decimal(0).logical_invert() * 9
2178-
>>> sys.getsizeof(x)
2179-
524288112
2180-
>>> x + 2
2181-
Traceback (most recent call last):
2182-
File "<stdin>", line 1, in <module>
2183-
decimal.Inexact: [<class 'decimal.Inexact'>]
2184-
2185-
In general (and especially on systems without overallocation), it is recommended
2186-
to estimate even tighter bounds and set the :attr:`Inexact` trap if all calculations
2187-
are expected to be exact.
2188-
2189-
2190-
.. [#]
2191-
.. versionadded:: 3.3
2192-
2193-
.. [#]
2194-
.. versionchanged:: 3.9
2195-
This approach now works for all exact results except for non-integer powers.
2196-
Also backported to 3.7 and 3.8.
2146+
.. versionadded:: 3.3

docs/_sources/library/shutil.rst.txt

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,14 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
567567
available), or "xztar" (if the :mod:`lzma` module is available).
568568

569569
*root_dir* is a directory that will be the root directory of the
570-
archive; for example, we typically chdir into *root_dir* before creating the
571-
archive.
570+
archive, all paths in the archive will be relative to it; for example,
571+
we typically chdir into *root_dir* before creating the archive.
572572

573573
*base_dir* is the directory where we start archiving from;
574574
i.e. *base_dir* will be the common prefix of all files and
575-
directories in the archive.
575+
directories in the archive. *base_dir* must be given relative
576+
to *root_dir*. See :ref:`shutil-archiving-example-with-basedir` for how to
577+
use *base_dir* and *root_dir* together.
576578

577579
*root_dir* and *base_dir* both default to the current directory.
578580

@@ -724,6 +726,48 @@ The resulting archive contains:
724726
-rw-r--r-- tarek/staff 37192 2010-02-06 18:23:10 ./known_hosts
725727
726728
729+
.. _shutil-archiving-example-with-basedir:
730+
731+
Archiving example with *base_dir*
732+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
733+
734+
In this example, similar to the `one above <shutil-archiving-example_>`_,
735+
we show how to use :func:`make_archive`, but this time with the usage of
736+
*base_dir*. We now have the following directory structure:
737+
738+
.. code-block:: shell-session
739+
740+
$ tree tmp
741+
tmp
742+
└── root
743+
└── structure
744+
├── content
745+
└── please_add.txt
746+
└── do_not_add.txt
747+
748+
In the final archive, :file:`please_add.txt` should be included, but
749+
:file:`do_not_add.txt` should not. Therefore we use the following::
750+
751+
>>> from shutil import make_archive
752+
>>> import os
753+
>>> archive_name = os.path.expanduser(os.path.join('~', 'myarchive'))
754+
>>> make_archive(
755+
... archive_name,
756+
... 'tar',
757+
... root_dir='tmp/root',
758+
... base_dir='structure/content',
759+
... )
760+
'/Users/tarek/my_archive.tar'
761+
762+
Listing the files in the resulting archive gives us:
763+
764+
.. code-block:: shell-session
765+
766+
$ python -m tarfile -l /Users/tarek/myarchive.tar
767+
structure/content/
768+
structure/content/please_add.txt
769+
770+
727771
Querying the size of the output terminal
728772
----------------------------------------
729773

docs/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ <h3>Nawigacja</h3>
202202
<br />
203203
<br />
204204

205-
Ostatnia modyfikacja cze 08, 2020.
205+
Ostatnia modyfikacja cze 09, 2020.
206206
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
207207
<br />
208208

docs/bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ <h3>Nawigacja</h3>
232232
<br />
233233
<br />
234234

235-
Ostatnia modyfikacja cze 08, 2020.
235+
Ostatnia modyfikacja cze 09, 2020.
236236
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
237237
<br />
238238

docs/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ <h3>Nawigacja</h3>
213213
<br />
214214
<br />
215215

216-
Ostatnia modyfikacja cze 08, 2020.
216+
Ostatnia modyfikacja cze 09, 2020.
217217
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
218218
<br />
219219

docs/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ <h3>Nawigacja</h3>
260260
<br />
261261
<br />
262262

263-
Ostatnia modyfikacja cze 08, 2020.
263+
Ostatnia modyfikacja cze 09, 2020.
264264
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
265265
<br />
266266

docs/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ <h3>Nawigacja</h3>
233233
<br />
234234
<br />
235235

236-
Ostatnia modyfikacja cze 08, 2020.
236+
Ostatnia modyfikacja cze 09, 2020.
237237
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
238238
<br />
239239

docs/c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ <h3>Nawigacja</h3>
796796
<br />
797797
<br />
798798

799-
Ostatnia modyfikacja cze 08, 2020.
799+
Ostatnia modyfikacja cze 09, 2020.
800800
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
801801
<br />
802802

docs/c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ <h3>Nawigacja</h3>
230230
<br />
231231
<br />
232232

233-
Ostatnia modyfikacja cze 08, 2020.
233+
Ostatnia modyfikacja cze 09, 2020.
234234
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
235235
<br />
236236

0 commit comments

Comments
 (0)