Skip to content

Commit 8b6073e

Browse files
committed
Update translation from Transifex
1 parent ca206dd commit 8b6073e

3 files changed

Lines changed: 85 additions & 8 deletions

File tree

faq/programming.po

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.9\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2021-01-01 05:02+0000\n"
14+
"POT-Creation-Date: 2021-04-04 05:56+0000\n"
1515
"PO-Revision-Date: 2017-02-16 17:43+0000\n"
1616
"Last-Translator: Stefan Ocetkiewicz <stefan.ocetkiewicz@gmail.com>, 2020\n"
1717
"Language-Team: Polish (https://www.transifex.com/python-doc/teams/5390/pl/)\n"
@@ -1556,6 +1556,84 @@ msgid ""
15561556
"reference to the object:"
15571557
msgstr ""
15581558

1559+
msgid "When can I rely on identity tests with the *is* operator?"
1560+
msgstr ""
1561+
1562+
msgid ""
1563+
"The ``is`` operator tests for object identity. The test ``a is b`` is "
1564+
"equivalent to ``id(a) == id(b)``."
1565+
msgstr ""
1566+
1567+
msgid ""
1568+
"The most important property of an identity test is that an object is always "
1569+
"identical to itself, ``a is a`` always returns ``True``. Identity tests are "
1570+
"usually faster than equality tests. And unlike equality tests, identity "
1571+
"tests are guaranteed to return a boolean ``True`` or ``False``."
1572+
msgstr ""
1573+
1574+
msgid ""
1575+
"However, identity tests can *only* be substituted for equality tests when "
1576+
"object identity is assured. Generally, there are three circumstances where "
1577+
"identity is guaranteed:"
1578+
msgstr ""
1579+
1580+
msgid ""
1581+
"1) Assignments create new names but do not change object identity. After "
1582+
"the assignment ``new = old``, it is guaranteed that ``new is old``."
1583+
msgstr ""
1584+
1585+
msgid ""
1586+
"2) Putting an object in a container that stores object references does not "
1587+
"change object identity. After the list assignment ``s[0] = x``, it is "
1588+
"guaranteed that ``s[0] is x``."
1589+
msgstr ""
1590+
1591+
msgid ""
1592+
"3) If an object is a singleton, it means that only one instance of that "
1593+
"object can exist. After the assignments ``a = None`` and ``b = None``, it "
1594+
"is guaranteed that ``a is b`` because ``None`` is a singleton."
1595+
msgstr ""
1596+
1597+
msgid ""
1598+
"In most other circumstances, identity tests are inadvisable and equality "
1599+
"tests are preferred. In particular, identity tests should not be used to "
1600+
"check constants such as :class:`int` and :class:`str` which aren't "
1601+
"guaranteed to be singletons::"
1602+
msgstr ""
1603+
1604+
msgid "Likewise, new instances of mutable containers are never identical::"
1605+
msgstr ""
1606+
1607+
msgid ""
1608+
"In the standard library code, you will see several common patterns for "
1609+
"correctly using identity tests:"
1610+
msgstr ""
1611+
1612+
msgid ""
1613+
"1) As recommended by :pep:`8`, an identity test is the preferred way to "
1614+
"check for ``None``. This reads like plain English in code and avoids "
1615+
"confusion with other objects that may have boolean values that evaluate to "
1616+
"false."
1617+
msgstr ""
1618+
1619+
msgid ""
1620+
"2) Detecting optional arguments can be tricky when ``None`` is a valid input "
1621+
"value. In those situations, you can create an singleton sentinel object "
1622+
"guaranteed to be distinct from other objects. For example, here is how to "
1623+
"implement a method that behaves like :meth:`dict.pop`::"
1624+
msgstr ""
1625+
1626+
msgid ""
1627+
"3) Container implementations sometimes need to augment equality tests with "
1628+
"identity tests. This prevents the code from being confused by objects such "
1629+
"as ``float('NaN')`` that are not equal to themselves."
1630+
msgstr ""
1631+
1632+
msgid ""
1633+
"For example, here is the implementation of :meth:`collections.abc.Sequence."
1634+
"__contains__`::"
1635+
msgstr ""
1636+
15591637
msgid "Modules"
15601638
msgstr ""
15611639

howto/descriptor.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.9\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2021-03-14 05:42+0000\n"
16+
"POT-Creation-Date: 2021-04-04 05:56+0000\n"
1717
"PO-Revision-Date: 2017-02-16 17:44+0000\n"
1818
"Last-Translator: m_aciek <maciej.olko@gmail.com>, 2020\n"
1919
"Language-Team: Polish (https://www.transifex.com/python-doc/teams/5390/pl/)\n"
@@ -197,7 +197,7 @@ msgstr ""
197197
msgid "The new class now logs access to both *name* and *age*:"
198198
msgstr ""
199199

200-
msgid "The two *Person* instances contain only the private names::"
200+
msgid "The two *Person* instances contain only the private names:"
201201
msgstr ""
202202

203203
msgid "Closing thoughts"
@@ -694,7 +694,7 @@ msgid ""
694694
"where *cls* comes from in class methods, this is it!"
695695
msgstr ""
696696

697-
msgid "Other kinds of methods"
697+
msgid "Kinds of methods"
698698
msgstr ""
699699

700700
msgid ""

tutorial/datastructures.po

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.9\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2021-01-01 05:02+0000\n"
14+
"POT-Creation-Date: 2021-04-04 05:56+0000\n"
1515
"PO-Revision-Date: 2017-02-16 23:40+0000\n"
1616
"Last-Translator: m_aciek <maciej.olko@gmail.com>, 2021\n"
1717
"Language-Team: Polish (https://www.transifex.com/python-doc/teams/5390/pl/)\n"
@@ -516,9 +516,8 @@ msgstr ""
516516
msgid ""
517517
"The comparison operators ``in`` and ``not in`` check whether a value occurs "
518518
"(does not occur) in a sequence. The operators ``is`` and ``is not`` compare "
519-
"whether two objects are really the same object; this only matters for "
520-
"mutable objects like lists. All comparison operators have the same "
521-
"priority, which is lower than that of all numerical operators."
519+
"whether two objects are really the same object. All comparison operators "
520+
"have the same priority, which is lower than that of all numerical operators."
522521
msgstr ""
523522

524523
msgid ""

0 commit comments

Comments
 (0)