77msgstr ""
88"Project-Id-Version : Python Training Course 2022.11.dev\n "
99"Report-Msgid-Bugs-To : \n "
10- "POT-Creation-Date : 2023-04-08 19:28 +0300\n "
11- "PO-Revision-Date : 2023-04-08 19:29 +0300\n "
10+ "POT-Creation-Date : 2023-04-11 15:34 +0300\n "
11+ "PO-Revision-Date : 2023-04-11 15:36 +0300\n "
1212"Last-Translator : Serhii Horodilov <sgorodil@gmail.com>\n "
1313"Language-Team : \n "
1414"Language : uk\n "
@@ -392,37 +392,58 @@ msgstr "Приховання Даних"
392392#: ../../src/oop/intro.txt:241
393393msgid ""
394394"Many programming languages has *access modifiers* implemented. The Python "
395- "has also, but actually no. It's implemented as a convention-level. All "
396- "class's members starting with underscore are considered to be **protected** "
397- "members and should not be accessible outside the class instance; on the "
398- "other hand members starting with two underscores are considered to be "
399- "**private** members and shouldn't be accessible outside the class instance "
400- "as well."
395+ "has also."
401396msgstr ""
402- "Багато мов програмування мають реалізовані модифікатори доступу. Python "
403- "також має, але насправді ні. Він реалізований на рівні конвенції. Усі члени "
404- "класу, які починаються з підкреслення, вважаються захищеними членами та не "
405- "повинні бути доступними за межами екземпляр класу; з іншого боку, члени, які "
406- "починаються з двох символів підкреслення, вважаються приватними членами та "
407- "не повинні бути доступними за межами екземпляра класу."
397+ "У багатьох мовах програмування реалізовані *модифікатори доступу*. Python "
398+ "також має."
408399
409- #: ../../src/oop/intro.txt:275
400+ #: ../../src/oop/intro.txt:247
410401msgid ""
411- "With the implementation above there are **public** attributes, but you can "
412- "still access data outside the class, but you definitely shouldn't."
402+ "\" Private\" instance variables that cannot be accessed except from inside an "
403+ "object don't exist in Python :cite:`docs-python:private-variables`. It's "
404+ "implemented as a convention-level."
413405msgstr ""
414- "З наведеною вище реалізацією є загальнодоступні атрибути, але ви все ще "
415- "можете отримати доступ до даних за межами класу, але точно не повинні."
406+ "\" Приватні\" змінні екземплярів, до яких можна отримати доступ лише "
407+ "зсередини об’єкта, не існують у Python :cite:`docs-python:private-"
408+ "variables`. Це реалізовано на рівні домовленності."
416409
417- #: ../../src/oop/intro.txt:290
410+ #: ../../src/oop/intro.txt:251
411+ msgid ""
412+ "A name prefixed with an underscore (e.g. ``_spam``) should be treated as a "
413+ "non-public part of the API (whether it is a function, a method or a data "
414+ "member). These should not be used outside the class itself and can be "
415+ "changed without notice."
416+ msgstr ""
417+ "Ім’я з префіксом підкреслення (наприклад, ``_spam``) слід розглядати як "
418+ "закриту частину API (незалежно від того, чи це функція, метод або елемент "
419+ "даних). Вони не повинні використовуватися поза межами самого класу та можуть "
420+ "бути змінені без попередження."
421+
422+ #: ../../src/oop/intro.txt:256
423+ msgid ""
424+ "Since there is a valid use case for class-private members (namely to avoid "
425+ "name clashes of names with names defined by subclasses), there is limited "
426+ "support for such a mechanism, called *name mangling*. Any identifier with at "
427+ "least two leading underscore (e.g. ``__spam``) is textually replaced with "
428+ "``_classname__spam``, where ``_classname`` is the current class name with "
429+ "leading underscore stripped."
430+ msgstr ""
431+ "Оскільки існує дійсний варіант використання для приватних членів класу (а "
432+ "саме, щоб уникнути зіткнень імен з іменами, визначеними підкласами), існує "
433+ "обмежена підтримка такого механізму, що називається *викривлення імен*. Будь-"
434+ "який ідентифікатор із принаймні двома символами підкреслення на початку "
435+ "(наприклад, ``__spam``) текстово замінюється на ``_classname__spam``, де "
436+ "``_classname`` є поточною назвою класу з видаленням підкреслення на початку."
437+
438+ #: ../../src/oop/intro.txt:295
418439msgid "Few Words about Inheritance"
419440msgstr "Кілька Слів про Наслідування"
420441
421- #: ../../src/oop/intro.txt:292
442+ #: ../../src/oop/intro.txt:297
422443msgid "Just in two words. This topic is discovered in the future articles."
423444msgstr "Всього в двох словах. Ця тема розкривається в наступних статтях."
424445
425- #: ../../src/oop/intro.txt:294
446+ #: ../../src/oop/intro.txt:299
426447msgid ""
427448"You can derive your classes from a super class. Derived classes are called "
428449"*sub classes* and the class used to inherit from is called *super class*. "
@@ -434,15 +455,15 @@ msgstr ""
434455"*суперкласом*. Іншими термінами є *дочірній* клас і *батьківський* клас, але "
435456"вони не є поширеними ( це особиста думка автора)."
436457
437- #: ../../src/oop/intro.txt:299
458+ #: ../../src/oop/intro.txt:304
438459msgid "Just put a super class in parenthesis two inherit from it:"
439460msgstr "Просто помістіть суперклас у дужки, які успадковують від нього два:"
440461
441- #: ../../src/oop/intro.txt:311
462+ #: ../../src/oop/intro.txt:316
442463msgid "Few Words about Polymorphism"
443464msgstr "Кілька Слів про Поліморфізм"
444465
445- #: ../../src/oop/intro.txt:313
466+ #: ../../src/oop/intro.txt:318
446467msgid ""
447468"You've already use this. The most simple explanation is **addition "
448469"operator**. For different types of data it would produce different types of "
@@ -451,7 +472,7 @@ msgstr ""
451472"Ви вже використовували це. Найпростішим поясненням є **оператор додавання**. "
452473"Для різних типів даних він створюватиме різні типи виводу:"
453474
454- #: ../../src/oop/intro.txt:321
475+ #: ../../src/oop/intro.txt:326
455476msgid ""
456477"For example you may have various classes inherited from a base class, that "
457478"provides a common interface, but each derived class may implement the method "
@@ -468,3 +489,27 @@ msgstr "Патерни Проектування"
468489#: ../../src/oop/solid.txt:3
469490msgid "SOLID Principles"
470491msgstr "Принципи SOLID"
492+
493+ #~ msgid ""
494+ #~ "Many programming languages has *access modifiers* implemented. The Python "
495+ #~ "has also, but actually no. It's implemented as a convention-level. All "
496+ #~ "class's members starting with underscore are considered to be "
497+ #~ "**protected** members and should not be accessible outside the class "
498+ #~ "instance; on the other hand members starting with two underscores are "
499+ #~ "considered to be **private** members and shouldn't be accessible outside "
500+ #~ "the class instance as well."
501+ #~ msgstr ""
502+ #~ "Багато мов програмування мають реалізовані модифікатори доступу. Python "
503+ #~ "також має, але насправді ні. Він реалізований на рівні конвенції. Усі "
504+ #~ "члени класу, які починаються з підкреслення, вважаються захищеними "
505+ #~ "членами та не повинні бути доступними за межами екземпляр класу; з іншого "
506+ #~ "боку, члени, які починаються з двох символів підкреслення, вважаються "
507+ #~ "приватними членами та не повинні бути доступними за межами екземпляра "
508+ #~ "класу."
509+
510+ #~ msgid ""
511+ #~ "With the implementation above there are **public** attributes, but you "
512+ #~ "can still access data outside the class, but you definitely shouldn't."
513+ #~ msgstr ""
514+ #~ "З наведеною вище реалізацією є загальнодоступні атрибути, але ви все ще "
515+ #~ "можете отримати доступ до даних за межами класу, але точно не повинні."
0 commit comments