From d5fd240776a8b1ca6adaee301c03830bb31bae0a Mon Sep 17 00:00:00 2001 From: vadal Date: Tue, 24 Feb 2026 17:54:36 +0200 Subject: [PATCH 01/17] Add translation for reference/import.po --- reference/import.po | 776 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 704 insertions(+), 72 deletions(-) diff --git a/reference/import.po b/reference/import.po index e34250d8..c2017029 100644 --- a/reference/import.po +++ b/reference/import.po @@ -9,17 +9,17 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-12-04 09:48+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"PO-Revision-Date: 2026-02-24 17:44+0200\n" +"Last-Translator: Vassiliki Dalakiari \n" +"Language-Team: PyGreece \n" +"Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: reference/import.rst:6 msgid "The import system" -msgstr "" +msgstr "Το σύστημα εισαγωγής" #: reference/import.rst:10 msgid "" @@ -29,6 +29,12 @@ msgid "" "way. Functions such as :func:`importlib.import_module` and built-in :func:" "`__import__` can also be used to invoke the import machinery." msgstr "" +"Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός άλλου module " +"μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:`import` είναι ο πιο " +"συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού import, αλλά δεν είναι ο μόνος. " +"Συναρτήσεις όπως η :func:`importlib.import_module` και η " +"ενσωματωμένη :func:`__import__` μπορούν επίσης να χρησιμοποιηθούν για την ενεργοποίηση " +"του μηχανισμού εισαγωγής." #: reference/import.rst:16 msgid "" @@ -41,6 +47,13 @@ msgid "" "keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" +"Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με το " +"συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της αναζήτησης σε ένα " +"όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της δήλωσης :keyword:`!import` ορίζεται " +"ως κλήση της συνάρτησης :func:`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής " +"της :func:`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " +"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` για τις " +"ακριβείς λεπτομέρειες αυτής της λειτουργίας." #: reference/import.rst:25 msgid "" @@ -50,6 +63,11 @@ msgid "" "(including :data:`sys.modules`), only the :keyword:`import` statement " "performs a name binding operation." msgstr "" +"Μια άμεση κλήση της :func:`__import__` εκτελεί μόνο την αναζήτηση του module και, αν " +"βρεθεί, τη λειτουργία δημιουργίας του. Παρότι μπορεί να προκύψουν ορισμένες " +"παρενέργειες, όπως η εισαγωγής των γονικών πακέτων και η ενημέρωση διάφορων προσωρινών μνημών " +"(συμπεριλαμβανομένου του :data:`sys.modules`), μόνο η δήλωση :keyword:`import` εκτελεί " +"λειτουργία δέσμευσης ονόματος." #: reference/import.rst:31 msgid "" @@ -58,6 +76,11 @@ msgid "" "system (such as :func:`importlib.import_module`) may choose to bypass :func:" "`__import__` and use their own solutions to implement import semantics." msgstr "" +"Όταν εκτελείται μια δήλωση :keyword:`import`, καλείται η τυπική ενσωματωμένη " +"συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος εισαγωγής " +"(όπως η :func:`importlib.import_module`) μπορεί να επιλέξουν να παρακάμψουν " +"τη :func:`__import__` και να χρησιμοποιήσουν δικές τους λύσεις για την υλοποίηση της " +"σημασιολογίας της εισαγωγής." #: reference/import.rst:36 msgid "" @@ -68,6 +91,13 @@ msgid "" "machinery is invoked. These strategies can be modified and extended by " "using various hooks described in the sections below." msgstr "" +"Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το βρει, " +"δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το module με το " +"συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η " +"εξαίρεση :exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " +"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι στρατηγικές μπορούν να " +"τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks που περιγράφονται στις παρακάτω " +"ενότητες." #: reference/import.rst:43 msgid "" @@ -76,10 +106,14 @@ msgid "" "import system is exposed through :data:`sys.meta_path`. In addition, native " "namespace package support has been implemented (see :pep:`420`)." msgstr "" +"Το σύστημα εισαγωγής έχει ενημερωθεί ώστε να υλοποιεί πλήρως τη δεύτερη φάση " +"του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο πλήρης " +"μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. Επιπλέον, έχει υλοποιηθεί " +"εγγενής υποστήριξη για namespace packages (βλ. :pep:`420`)." #: reference/import.rst:51 msgid ":mod:`importlib`" -msgstr "" +msgstr ":mod:`importlib`" #: reference/import.rst:53 msgid "" @@ -89,10 +123,15 @@ msgid "" "import machinery. Refer to the :mod:`importlib` library documentation for " "additional detail." msgstr "" +"Το module :mod:`importlib` παρέχει ένα πλούσιο API για αλληλεπίδραση με το σύστημα " +"εισαγωγής. Για παράδειγμα, η :func:`importlib.import_module` παρέχει ένα προτεινόμενο, " +"απλούστερο API από την ενσωματωμένη :func:`__import__` για την ενεργοποίηση του " +"μηχανισμού εισαγωγής. Ανατρέξτε στην τεκμηρίωση της βιβλιοθήκης :mod:`importlib` για " +"περισσότερες λεπτομέρειες." #: reference/import.rst:62 msgid "Packages" -msgstr "" +msgstr "Πακέτα" #: reference/import.rst:67 msgid "" @@ -101,6 +140,10 @@ msgid "" "else. To help organize modules and provide a naming hierarchy, Python has a " "concept of :term:`packages `." msgstr "" +"Η Python έχει μόνο έναν τύπο αντικειμένου module, και όλα τα modules είναι αυτού του " +"τύπου, ανεξάρτητα από το αν το module υλοποιείται σε Python, C ή κάτι άλλο. Για να " +"βοηθήσει στην οργάνωση των modules και να παρέχει μια ιεραρχία ονοματοδοσίας, η Python " +"διαθέτει την έννοια των :term:`packages `." #: reference/import.rst:72 msgid "" @@ -112,6 +155,12 @@ msgid "" "hierarchically, and packages may themselves contain subpackages, as well as " "regular modules." msgstr "" +"Μπορείτε να σκεφτείτε τα packages ως φακέλους σε ένα σύστημα αρχείων και τα modules ως " +"αρχεία μέσα σε φακέλους, αλλά μην πάρετε αυτή την αναλογία κυριολεκτικά, καθώς packages " +"και modules δεν είναι απαραίτητο να προέρχονται από το σύστημα αρχείων. Για τους " +"σκοπούς αυτής της τεκμηρίωσης, θα χρησιμοποιήσουμε αυτή τη βολική αναλογία φακέλων και " +"αρχείων. Όπως οι φάκελοι του συστήματος αρχείων, τα packages οργανώνονται ιεραρχικά, " +"και μπορούν να περιέχουν subpackages, καθώς και κανονικά modules." #: reference/import.rst:80 msgid "" @@ -120,6 +169,9 @@ msgid "" "of module. Specifically, any module that contains a ``__path__`` attribute " "is considered a package." msgstr "" +"Είναι σημαντικό να έχετε υπόψη ότι όλα τα packages είναι modules, αλλά δεν είναι όλα τα " +"modules packages. Με άλλα λόγια, τα packages είναι απλώς ένας ειδικός τύπος module. " +"Συγκεκριμένα, οποιοδήποτε module περιέχει το χαρακτηριστικό ``__path__`` θεωρείται package." #: reference/import.rst:85 msgid "" @@ -129,10 +181,15 @@ msgid "" "subpackage called :mod:`email.mime` and a module within that subpackage " "called :mod:`email.mime.text`." msgstr "" +"Όλα τα modules έχουν ένα όνομα. Τα ονόματα των subpackages διαχωρίζονται από το όνομα " +"του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη πρόσβασης σε " +"χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package με όνομα :mod:`email`, το " +"οποίο με τη σειρά του έχει ένα subpackage με όνομα :mod:`email.mime` και ένα module " +"μέσα σε αυτό το subpackage με όνομα :mod:`email.mime.text`." #: reference/import.rst:93 msgid "Regular packages" -msgstr "" +msgstr "Κανονικά πακέτα" #: reference/import.rst:98 msgid "" @@ -146,12 +203,23 @@ msgid "" "same Python code that any other module can contain, and Python will add some " "additional attributes to the module when it is imported." msgstr "" +"Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και " +"τα :term:`namespace packages `. Τα regular packages είναι τα " +"παραδοσιακά packages όπως υπήρχαν στην Python 3.2 και παλαιότερα. Ένα regular package " +"υλοποιείται συνήθως ως φάκελος που περιέχει ένα αρχείο ``__init__.py``. Όταν " +"εισάγεται ένα regular package, το αρχείο ``__init__.py`` εκτελείται έμμεσα, και τα " +"αντικείμενα που ορίζει δεσμεύονται σε ονόματα στο namespace του package. Το " +"``__init__.py`` μπορεί να περιέχει τον ίδιο κώδικα Python που μπορεί να περιέχει " +"οποιοδήποτε άλλο module, και η Python θα προσθέσει ορισμένα επιπλέον χαρακτηριστικά στο " +"module όταν εισάγεται." #: reference/import.rst:108 msgid "" -"For example, the following file system layout defines a top level ``parent`` " -"package with three subpackages::" +"For example, the following file system layout defines a top level ``parent`` package " +"with three subpackages::" msgstr "" +"Για παράδειγμα, η ακόλουθη διάταξη στο σύστημα αρχείων ορίζει ένα package ανωτέρου " +"επιπέδου ``parent`` με τρία subpackages::" #: reference/import.rst:111 msgid "" @@ -164,6 +232,14 @@ msgid "" " three/\n" " __init__.py" msgstr "" +"parent/\n" +" __init__.py\n" +" one/\n" +" __init__.py\n" +" two/\n" +" __init__.py\n" +" three/\n" +" __init__.py" #: reference/import.rst:120 msgid "" @@ -172,10 +248,14 @@ msgid "" "``parent.three`` will execute ``parent/two/__init__.py`` and ``parent/three/" "__init__.py`` respectively." msgstr "" +"Η εισαγωγή του ``parent.one`` θα εκτελέσει έμμεσα τα ``parent/__init__.py`` και " +"``parent/one/__init__.py``. Μετέπειτα εισαγωγές του ``parent.two`` ή του " +"``parent.three`` θα εκτελέσουν τα ``parent/two/__init__.py`` και ``parent/three/" +"__init__.py`` αντίστοιχα." #: reference/import.rst:129 msgid "Namespace packages" -msgstr "" +msgstr "Namespace πακέτα" #: reference/import.rst:135 msgid "" @@ -187,6 +267,13 @@ msgid "" "objects on the file system; they may be virtual modules that have no " "concrete representation." msgstr "" +"Ένα namespace πακέτο είναι ένας συνδυασμός από διάφορα :term:`portions `, όπου " +"κάθε portion συνεισφέρει ένα subpackage στο γονικό πακέτο. Τα portions μπορεί να " +"βρίσκονται σε διαφορετικές τοποθεσίες στο σύστημα αρχείων. Μπορεί επίσης να βρίσκονται " +"σε zip αρχεία, στο δίκτυο ή οπουδήποτε αλλού αναζητά η Python κατά την εισαγωγή. Τα " +"namespace πακέτα μπορεί να αντιστοιχούν ή να μην αντιστοιχούν άμεσα σε αντικείμενα στο " +"σύστημα αρχείων· μπορεί να είναι «εικονικά» modules που δεν έχουν συγκεκριμένη φυσική " +"αναπαράσταση." #: reference/import.rst:143 msgid "" @@ -196,6 +283,11 @@ msgid "" "that package if the path of their parent package (or :data:`sys.path` for a " "top level package) changes." msgstr "" +"Τα namespace πακέτα δεν χρησιμοποιούν μια συνηθισμένη λίστα για το χαρακτηριστικό " +"``__path__``. Αντί γι’ αυτό χρησιμοποιούν έναν προσαρμοσμένο iterable τύπο, ο οποίος θα " +"εκτελέσει αυτόματα νέα αναζήτηση για portions του πακέτου στην επόμενη προσπάθεια " +"εισαγωγής μέσα σε αυτό το πακέτο, αν αλλάξει το path του γονικού πακέτου (ή " +"το :data:`sys.path` για πακέτο ανωτέρου επιπέδου)." #: reference/import.rst:149 msgid "" @@ -206,14 +298,20 @@ msgid "" "create a namespace package for the top-level ``parent`` package whenever it " "or one of its subpackages is imported." msgstr "" +"Με τα namespace πακέτα, δεν υπάρχει αρχείο ``parent/__init__.py``. Στην πράξη, μπορεί " +"να βρεθούν πολλοί φάκελοι ``parent`` κατά την αναζήτηση εισαγωγής, όπου ο καθένας " +"παρέχεται από διαφορετικό portion. Έτσι, το ``parent/one`` ενδέχεται να μην βρίσκεται " +"φυσικά δίπλα στο ``parent/two``. Σε αυτή την περίπτωση, η Python θα δημιουργήσει ένα " +"namespace πακέτο για το πακέτο ανωτέρου επιπέδου ``parent`` κάθε φορά που γίνεται " +"εισαγωγή αυτού ή κάποιου από τα subpackages του." #: reference/import.rst:156 msgid "See also :pep:`420` for the namespace package specification." -msgstr "" +msgstr "Δείτε επίσης το :pep:`420` για την προδιαγραφή των namespace πακέτων." #: reference/import.rst:160 msgid "Searching" -msgstr "" +msgstr "Αναζήτηση" #: reference/import.rst:162 msgid "" @@ -224,6 +322,11 @@ msgid "" "parameters to the :func:`importlib.import_module` or :func:`__import__` " "functions." msgstr "" +"Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως αναγνωρισμένο " +"` όνομα του module (ή του πακέτου, αλλά για τους σκοπούς αυτής της " +"συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. Αυτό το όνομα μπορεί να προέρχεται " +"από διάφορα ορίσματα της δήλωσης :keyword:`import` ή από τις παραμέτρους των " +"συναρτήσεων :func:`importlib.import_module` ή :func:`__import__`." #: reference/import.rst:168 msgid "" @@ -233,10 +336,15 @@ msgid "" "baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " "is raised." msgstr "" +"Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και μπορεί να " +"είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar.baz``. Σε αυτή την " +"περίπτωση, η Python πρώτα προσπαθεί να εισάγει το ``foo``, μετά το ``foo.bar`` και " +"τέλος το ``foo.bar.baz``. Αν αποτύχει κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise " +"η :exc:`ModuleNotFoundError`." #: reference/import.rst:175 msgid "The module cache" -msgstr "" +msgstr "Η προσωρινή μνήμη των modules" #: reference/import.rst:180 msgid "" @@ -247,6 +355,12 @@ msgid "" "and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" +"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:`sys.modules`. " +"Αυτη η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των modules που έχουν εισαχθεί " +"στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων διαδρομών. Έτσι, αν το ``foo.bar.baz`` " +"είχε εισαχθεί προηγουμένως, το :data:`sys.modules` θα περιέχει εγγραφές για τα ``foo``, " +"``foo.bar`` και ``foo.bar.baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο " +"module." #: reference/import.rst:187 msgid "" @@ -256,6 +370,11 @@ msgid "" "`ModuleNotFoundError` is raised. If the module name is missing, Python will " "continue searching for the module." msgstr "" +"Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` και, αν " +"υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την εισαγωγή και η " +"διαδικασία ολοκληρώνεται. Ωστόσο, αν η τιμή είναι ``None``, τότε γίνεται raise " +"το :exc:`ModuleNotFoundError`. Αν το όνομα του module λείπει, η Python θα συνεχίσει να " +"αναζητά το module." #: reference/import.rst:193 msgid "" @@ -266,6 +385,12 @@ msgid "" "to ``None``, forcing the next import of the module to result in a :exc:" "`ModuleNotFoundError`." msgstr "" +"Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να μην " +"καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν αναφορές σε " +"αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το module με το " +"συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει ξανά στην επόμενο εισαγωγή. Το " +"κλειδί μπορεί επίσης να οριστεί σε ``None``, αναγκάζοντας την επόμενο εισαγωγή του module " +"να καταλήξει σε :exc:`ModuleNotFoundError`." #: reference/import.rst:200 msgid "" @@ -275,10 +400,15 @@ msgid "" "reload` will reuse the *same* module object, and simply reinitialise the " "module contents by rerunning the module's code." msgstr "" +"Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την εγγραφή " +"του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε εισαγωγή το module " +"με το ίδιο όνομα, τα δύο αντικείμενα module *δεν* θα είναι τα ίδια. Αντίθετα, " +"η :func:`importlib.reload` θα επαναχρησιμοποιήσει το *ίδιο* αντικείμενο module και " +"απλώς θα επαναρχικοποιήσει τα περιεχόμενά του εκτελώντας ξανά τον κώδικα του module." #: reference/import.rst:210 msgid "Finders and loaders" -msgstr "" +msgstr "Finders και loaders" #: reference/import.rst:217 msgid "" @@ -291,6 +421,14 @@ msgid "" "they return themselves when they find that they can load the requested " "module." msgstr "" +"Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, τότε " +"ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να φορτωθεί το " +"module. Αυτό το πρωτόκολλο αποτελείται από δύο εννοιολογικά αντικείμενα: :term:`finders " +"` και :term:`loaders `. Ο ρόλος ενός finder είναι να καθορίσει αν " +"μπορεί να βρει το module με το συγκεκριμένο όνομα, χρησιμοποιώντας όποια στρατηγική " +"γνωρίζει. Αντικείμενα που υλοποιούν και τις δύο αυτές διεπαφές αναφέρονται " +"ως :term:`importers ` - επιστρέφουν τον εαυτό τους όταν διαπιστώσουν ότι " +"μπορούν να φορτώσουν το ζητούμενο module." #: reference/import.rst:225 msgid "" @@ -301,12 +439,20 @@ msgid "" "system paths or zip files. It can also be extended to search for any " "locatable resource, such as those identified by URLs." msgstr "" +"Η Python περιλαμβάνει αρκετούς προεπιλεγμένους finders και importers. Το πρώτο γνωρίζει " +"πώς να εντοπίζει built-in modules, και το δεύτερο πώς να εντοπίζει παγωμένα (frozen) " +"modules. Ένας τρίτος προεπιλεγμένος finder αναζητά modules σε ένα :term:`import path`. " +"Το :term:`import path` είναι μια λίστα από τοποθεσίες που μπορεί να είναι διαδρομές του " +"συστήματος αρχείων ή zip αρχεία. Μπορεί επίσης να επεκταθεί ώστε να αναζητά " +"οποιονδήποτε εντοπίσιμο πόρο, όπως αυτούς που προσδιορίζονται από URLs." #: reference/import.rst:232 msgid "" "The import machinery is extensible, so new finders can be added to extend " "the range and scope of module searching." msgstr "" +"Ο μηχανισμός εισαγωγής είναι επεκτάσιμος, επομένως μπορούν να προστεθούν νέοι finders " +"ώστε να επεκταθεί το εύρος και η κάλυψη της αναζήτησης των modules." #: reference/import.rst:235 msgid "" @@ -315,6 +461,10 @@ msgid "" "related information, which the import machinery then uses when loading the " "module." msgstr "" +"Οι finders δεν φορτώνουν πραγματικά τα modules. Αν μπορούν να βρουν το module με το " +"συγκεκριμένο όνομα, επιστρέφουν ένα :dfn:`module spec`, δηλαδή μια ενθυλάκωση της " +"πληροφορίας που σχετίζεται με την εισαγωγή του module, την οποία ο μηχανισμός εισαγωγής " +"χρησιμοποιεί στη συνέχεια για να φορτώσει το module." #: reference/import.rst:239 msgid "" @@ -322,6 +472,9 @@ msgid "" "detail, including how you can create and register new ones to extend the " "import machinery." msgstr "" +"Οι ακόλουθες ενότητες περιγράφουν πιο αναλυτικά το πρωτόκολλο για finders και loaders, " +"συμπεριλαμβανομένου του πώς μπορείτε να δημιουργήσετε και να καταχωρίσετε νέους, ώστε " +"να επεκτείνετε τον μηχανισμό εισαγωγής." #: reference/import.rst:243 msgid "" @@ -329,10 +482,13 @@ msgid "" "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" +"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:`loaders " +"`, ενώ τώρα επιστρέφουν module specs που *περιέχουν* loaders. Οι loaders " +"εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά έχουν λιγότερες ευθύνες." #: reference/import.rst:249 msgid "Import hooks" -msgstr "" +msgstr "Εισαγωγή hooks" #: reference/import.rst:259 msgid "" @@ -340,6 +496,9 @@ msgid "" "this are the *import hooks*. There are two types of import hooks: *meta " "hooks* and *import path hooks*." msgstr "" +"Ο μηχανισμός εισαγωγής είναι σχεδιασμένος ώστε να είναι επεκτάσιμος· ο βασικός " +"μηχανισμός για αυτό είναι η *εισαγωγή hooks*. Υπάρχουν δύο τύποι εισαγωγής hooks: *meta " +"hooks* και *import path hooks*." #: reference/import.rst:263 msgid "" @@ -349,6 +508,12 @@ msgid "" "modules, or even built-in modules. Meta hooks are registered by adding new " "finder objects to :data:`sys.meta_path`, as described below." msgstr "" +"Τα meta hooks καλούνται στην αρχή της επεξεργασίας εισαγωγής, πριν συμβεί οποιαδήποτε " +"άλλη επεξεργασία εισαγωγής, εκτός από την αναζήτηση στην προσωρινή μνήμη " +"του :data:`sys.modules`. Αυτό επιτρέπει στα meta hooks να υπερκαλύπτουν την επεξεργασία " +"του :data:`sys.path`, τα παγωμένα modules ή ακόμη και τα built-in modules. Τα meta " +"hooks καταχωρίζονται προσθέτοντας νέα αντικείμενα finder στο :data:`sys.meta_path`, " +"όπως περιγράφεται παρακάτω." #: reference/import.rst:269 msgid "" @@ -357,10 +522,14 @@ msgid "" "encountered. Import path hooks are registered by adding new callables to :" "data:`sys.path_hooks` as described below." msgstr "" +"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys.path` (ή του " +"``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο στοιχείο διαδρομής. Τα " +"import path hooks καταχωρίζονται προσθέτοντας νέα callables στο :data:`sys.path_hooks`, " +"όπως περιγράφεται παρακάτω." #: reference/import.rst:276 msgid "The meta path" -msgstr "" +msgstr "Το meta path" #: reference/import.rst:282 msgid "" @@ -373,6 +542,14 @@ msgid "" "finder can use any strategy it wants to determine whether it can handle the " "named module or not." msgstr "" +"Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, η Python " +"στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο περιέχει μια λίστα από meta " +"path finder αντικείμενα. Αυτοί οι finders ερωτώνται με τη σειρά για να διαπιστωθεί αν " +"γνωρίζουν πώς να χειριστούν το module. Οι meta path finders πρέπει να υλοποιούν μια " +"μέθοδο με όνομα :meth:`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία " +"ορίσματα: ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " +"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να καθορίσει αν μπορεί " +"να χειριστεί το module ή όχι." #: reference/import.rst:291 msgid "" @@ -382,6 +559,11 @@ msgid "" "returning a spec, then a :exc:`ModuleNotFoundError` is raised. Any other " "exceptions raised are simply propagated up, aborting the import process." msgstr "" +"Αν ο meta path finder γνωρίζει πώς να χειριστεί το module, επιστρέφει ένα spec " +"αντικείμενο. Αν δεν μπορεί να χειριστεί το module, επιστρέφει ``None``. Αν η " +"επεξεργασία του :data:`sys.meta_path` φτάσει στο τέλος της λίστας χωρίς να επιστραφεί " +"spec, τότε γίνεται raise το :exc:`ModuleNotFoundError`. Οποιεσδήποτε άλλες εξαιρέσεις " +"γίνονται raise απλώς προωθούνται προς τα πάνω, τερματίζοντας τη διαδικασία εισαγωγής." #: reference/import.rst:297 msgid "" @@ -396,6 +578,15 @@ msgid "" "existing module object that will be the target of loading later. The import " "system passes in a target module only during reload." msgstr "" +"Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path finders " +"καλείται με δύο ή τρία ορίσματα. Το πρώτο είναι το πλήρως αναγνωρισμένο όνομα του " +"module που εισάγεται, π.χ. ``foo.bar.baz``. Το δεύτερο όρισμα είναι οι καταχωρήσεις " +"διαδρομής που θα χρησιμοποιηθούν για την αναζήτηση του module. Για modules ανωτέρου " +"επιπέδου, το δεύτερο όρισμα είναι ``None``, αλλά για submodules ή subpackages, είναι η " +"τιμή του χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η πρόσβαση στο " +"κατάλληλο ``__path__``, γίνεται raise το :exc:`ModuleNotFoundError`. Το τρίτο όρισμα " +"είναι ένα υπάρχον αντικείμενο module που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. " +"Το σύστημα εισαγωγής περνά target module μόνο κατά την επαναφόρτωση." #: reference/import.rst:308 msgid "" @@ -408,6 +599,14 @@ msgid "" "__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " "will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." msgstr "" +"Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα εισαγωγής. Για " +"παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules δεν έχει ήδη προστεθεί " +"στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` θα εκτελέσει πρώτα μία εισαγωγή " +"ανωτέρου επιπέδου, καλώντας το ``mpf.find_spec(\"foo\", None, None)`` σε κάθε meta path " +"finder (``mpf``). Αφού εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το " +"meta path για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " +"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα καλέσει το " +"``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." #: reference/import.rst:318 msgid "" @@ -415,6 +614,9 @@ msgid "" "always return ``None`` when anything other than ``None`` is passed as the " "second argument." msgstr "" +"Ορισμένοι meta path finders υποστηρίζουν μόνο εισαγωγές ανωτέρου επιπέδου. Αυτοί οι " +"importers θα επιστρέφουν πάντα ``None`` όταν ως δεύτερο όρισμα περάσει οτιδήποτε άλλο " +"εκτός από ``None``." #: reference/import.rst:322 msgid "" @@ -423,6 +625,10 @@ msgid "" "modules, and one that knows how to import modules from an :term:`import " "path` (i.e. the :term:`path based finder`)." msgstr "" +"Το προεπιλεγμένο :data:`sys.meta_path` της Python έχει τρεις meta path finders: έναν " +"που γνωρίζει πώς να εισάγει ενσωματωμένα modules, έναν που γνωρίζει πώς να εισάγει " +"παγωμένα modules, και έναν που γνωρίζει πώς να εισάγει modules από ένα :term:`import " +"path` (δηλ. τον :term:`path based finder`)." #: reference/import.rst:327 msgid "" @@ -432,22 +638,30 @@ msgid "" "if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." "find_spec`." msgstr "" +"Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path finders " +"αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί ως απαρχαιωμένη. Αν " +"και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο μηχανισμός εισαγωγής θα τη δοκιμάζει " +"μόνο αν ο finder δεν υλοποιεί τη :meth:`~importlib.abc.MetaPathFinder.find_spec`." #: reference/import.rst:334 msgid "" "Use of :meth:`!find_module` by the import system now raises :exc:" "`ImportWarning`." msgstr "" +"Η χρήση της :meth:`!find_module` από το σύστημα εισαγωγής πλέον κάνει raise " +"την :exc:`ImportWarning`." #: reference/import.rst:338 msgid "" ":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." "MetaPathFinder.find_spec` instead." msgstr "" +"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε " +"την :meth:`~importlib.abc.MetaPathFinder.find_spec` στη θέση της." #: reference/import.rst:344 msgid "Loading" -msgstr "" +msgstr "Φόρτωση" #: reference/import.rst:346 msgid "" @@ -455,6 +669,9 @@ msgid "" "the loader it contains) when loading the module. Here is an approximation " "of what happens during the loading portion of import::" msgstr "" +"Αν και όταν βρεθεί ένα module spec, ο μηχανισμός εισαγωγής θα το χρησιμοποιήσει (και " +"τον loader που περιέχει) για να φορτώσει το module. Ακολουθεί μια προσέγγιση του τι " +"συμβαίνει στο στάδιο φόρτωσης του import::" #: reference/import.rst:350 msgid "" @@ -487,16 +704,46 @@ msgid "" " raise\n" "return sys.modules[spec.name]" msgstr "" +"module = None\n" +"if spec.loader is not None and hasattr(spec.loader, 'create_module'):\n" +" # It is assumed 'exec_module' will also be defined on the loader.\n" +" module = spec.loader.create_module(spec)\n" +"if module is None:\n" +" module = ModuleType(spec.name)\n" +"# The import-related module attributes get set here:\n" +"_init_module_attrs(spec, module)\n" +"\n" +"if spec.loader is None:\n" +" # unsupported\n" +" raise ImportError\n" +"if spec.origin is None and spec.submodule_search_locations is not None:\n" +" # namespace package\n" +" sys.modules[spec.name] = module\n" +"elif not hasattr(spec.loader, 'exec_module'):\n" +" module = spec.loader.load_module(spec.name)\n" +"else:\n" +" sys.modules[spec.name] = module\n" +" try:\n" +" spec.loader.exec_module(module)\n" +" except BaseException:\n" +" try:\n" +" del sys.modules[spec.name]\n" +" except KeyError:\n" +" pass\n" +" raise\n" +"return sys.modules[spec.name]" #: reference/import.rst:379 msgid "Note the following details:" -msgstr "" +msgstr "Σημειώστε τις ακόλουθες λεπτομέρειες:" #: reference/import.rst:381 msgid "" "If there is an existing module object with the given name in :data:`sys." "modules`, import will have already returned it." msgstr "" +"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys.modules`, " +"το import θα το έχει ήδη επιστρέψει." #: reference/import.rst:384 msgid "" @@ -506,6 +753,10 @@ msgid "" "prevents unbounded recursion in the worst case and multiple loading in the " "best." msgstr "" +"Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον κώδικα του " +"module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί (άμεσα ή έμμεσα) να " +"εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys.modules` εκ των προτέρων αποτρέπει " +"ατέρμονη αναδρομή στη χειρότερη περίπτωση και πολλαπλή φόρτωση στην καλύτερη." #: reference/import.rst:390 msgid "" @@ -515,6 +766,12 @@ msgid "" "effect, must remain in the cache. This contrasts with reloading where even " "the failing module is left in :data:`sys.modules`." msgstr "" +"Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται από " +"το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή μνήμη " +"του :data:`sys.modules`, καθώς και οποιοδήποτε module φορτώθηκε επιτυχώς ως " +"παρενέργεια, πρέπει να παραμείνει στην προσωρινή μνήμη. Αυτό έρχεται σε αντίθεση με την " +"επαναφόρτωση, όπου ακόμη και το module που αποτυγχάνει παραμένει " +"στο :data:`sys.modules`." #: reference/import.rst:396 msgid "" @@ -523,6 +780,10 @@ msgid "" "code example above), as summarized in a :ref:`later section `." msgstr "" +"Αφού δημιουργηθεί το module αλλά πριν την εκτέλεση, ο μηχανισμός εισαγωγής ορίζει τα " +"χαρακτηριστικά του module που σχετίζονται με την εισαγωγή (\"_init_module_attrs\" στο " +"παραπάνω παράδειγμα ψευδοκώδικα), όπως συνοψίζεται σε μια :ref:`μεταγενέστερη ενότητα " +"`." #: reference/import.rst:401 msgid "" @@ -530,12 +791,17 @@ msgid "" "namespace gets populated. Execution is entirely delegated to the loader, " "which gets to decide what gets populated and how." msgstr "" +"Η εκτέλεση του module είναι η κρίσιμη στιγμή της φόρτωσης κατά την οποία γεμίζει το " +"namespace του module. Η εκτέλεση ανατίθεται εξ ολοκλήρου στον loader, ο οποίος " +"αποφασίζει τι θα συμπληρωθεί και με ποιον τρόπο." #: reference/import.rst:405 msgid "" "The module created during loading and passed to exec_module() may not be the " "one returned at the end of import [#fnlo]_." msgstr "" +"Το module που δημιουργείται κατά τη φόρτωση και περνά στη exec_module() ενδέχεται να " +"μην είναι αυτό που επιστρέφεται στο τέλος του import [#fnlo]_." #: reference/import.rst:408 msgid "" @@ -543,10 +809,12 @@ msgid "" "loaders. These were previously performed by the :meth:`importlib.abc.Loader." "load_module` method." msgstr "" +"Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. Αυτές " +"εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader.load_module`." #: reference/import.rst:414 msgid "Loaders" -msgstr "" +msgstr "Loaders" #: reference/import.rst:416 msgid "" @@ -555,10 +823,14 @@ msgid "" "method with a single argument, the module object to execute. Any value " "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" +"Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση του " +"module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc.Loader.exec_module` " +"με ένα μόνο όρισμα, το αντικείμενο module που θα εκτελεστεί. Οποιαδήποτε τιμή " +"επιστρέφει η :meth:`~importlib.abc.Loader.exec_module` αγνοείται." #: reference/import.rst:421 msgid "Loaders must satisfy the following requirements:" -msgstr "" +msgstr "Οι loaders πρέπει να ικανοποιούν τις ακόλουθες απαιτήσεις:" #: reference/import.rst:423 msgid "" @@ -566,6 +838,9 @@ msgid "" "dynamically loaded extension), the loader should execute the module's code " "in the module's global name space (``module.__dict__``)." msgstr "" +"Αν το module είναι Python module (σε αντίθεση με ένα ενσωματωμένο module ή δυναμικά " +"φορτωμένη επέκταση), ο loader θα πρέπει να εκτελέσει τον κώδικα του module στο καθολικό " +"namespace του module (``module.__dict__``)." #: reference/import.rst:427 msgid "" @@ -573,6 +848,9 @@ msgid "" "`ImportError`, although any other exception raised during :meth:`~importlib." "abc.Loader.exec_module` will be propagated." msgstr "" +"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise " +"το :exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά " +"τη :meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." #: reference/import.rst:431 msgid "" @@ -580,6 +858,9 @@ msgid "" "the :meth:`~importlib.abc.MetaPathFinder.find_spec` method would just return " "a spec with the loader set to ``self``." msgstr "" +"Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο αντικείμενο· σε " +"αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` απλώς " +"θα επιστρέψει ένα spec με τον loader ορισμένο σε ``self``." #: reference/import.rst:435 msgid "" @@ -590,10 +871,16 @@ msgid "" "the module object. If the method returns ``None``, the import machinery " "will create the new module itself." msgstr "" +"Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module κατά τη " +"φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader.create_module`. Παίρνει ένα " +"όρισμα, το module spec, και επιστρέφει το νέο αντικείμενο module που θα χρησιμοποιηθεί " +"κατά τη φόρτωση. Η ``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο " +"αντικείμενο module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " +"δημιουργήσει ο ίδιος το νέο module." #: reference/import.rst:442 msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." -msgstr "" +msgstr "Η μέθοδος :meth:`~importlib.abc.Loader.create_module` των loaders." #: reference/import.rst:445 msgid "" @@ -601,6 +888,9 @@ msgid "" "`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " "boilerplate responsibilities of loading." msgstr "" +"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από " +"την :meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε όλες " +"τις τυποποιημένες ευθύνες της φόρτωσης." #: reference/import.rst:450 msgid "" @@ -609,6 +899,10 @@ msgid "" "also implement ``exec_module()``. However, ``load_module()`` has been " "deprecated and loaders should implement ``exec_module()`` instead." msgstr "" +"Για συμβατότητα με υπάρχοντες loaders, ο μηχανισμός εισαγωγής θα χρησιμοποιήσει τη " +"μέθοδο ``load_module()`` αν υπάρχει και ο loader δεν υλοποιεί την ``exec_module()``. " +"Ωστόσο, η ``load_module()`` είναι απαρχαιωμένη και οι loaders θα πρέπει να υλοποιούν " +"την ``exec_module()``." #: reference/import.rst:455 msgid "" @@ -616,6 +910,9 @@ msgid "" "functionality described above in addition to executing the module. All the " "same constraints apply, with some additional clarification:" msgstr "" +"Η μέθοδος ``load_module()`` πρέπει να υλοποιεί όλη την τυποποιημένη λειτουργικότητα " +"φόρτωσης που περιγράφεται παραπάνω, επιπλέον της εκτέλεσης του module. Ισχύουν οι ίδιοι " +"περιορισμοί, με κάποιες επιπλέον διευκρινίσεις:" #: reference/import.rst:459 msgid "" @@ -625,12 +922,19 @@ msgid "" "exist in :data:`sys.modules`, the loader must create a new module object and " "add it to :data:`sys.modules`." msgstr "" +"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys.modules`, ο " +"loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. (Διαφορετικά, " +"η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το module με το συγκεκριμένο " +"όνομα δεν υπάρχει στο :data:`sys.modules`, ο loader πρέπει να δημιουργήσει νέο " +"αντικείμενο module και να το προσθέσει στο :data:`sys.modules`." #: reference/import.rst:465 msgid "" "The module *must* exist in :data:`sys.modules` before the loader executes " "the module code, to prevent unbounded recursion or multiple loading." msgstr "" +"Το module *πρέπει* να υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " +"κώδικα του module, ώστε να αποτραπεί ατέρμονη αναδρομή ή πολλαπλή φόρτωση." #: reference/import.rst:469 msgid "" @@ -638,26 +942,33 @@ msgid "" "data:`sys.modules`, but it must remove **only** the failing module(s), and " "only if the loader itself has loaded the module(s) explicitly." msgstr "" +"Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει εισάγει " +"στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα module(s) που " +"απέτυχαν, και μόνο αν ο loader έχει φορτώσει τα module(s) αυτά ρητά." #: reference/import.rst:474 msgid "" "A :exc:`DeprecationWarning` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" +"Γίνεται raise η :exc:`DeprecationWarning` όταν ορίζεται η ``exec_module()`` αλλά δεν " +"ορίζεται η ``create_module()``." #: reference/import.rst:478 msgid "" "An :exc:`ImportError` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" +"Γίνεται raise το :exc:`ImportError` όταν ορίζεται η ``exec_module()`` αλλά δεν ορίζεται " +"η ``create_module()``." #: reference/import.rst:482 msgid "Use of ``load_module()`` will raise :exc:`ImportWarning`." -msgstr "" +msgstr "Η χρήση της ``load_module()`` θα κάνει raise την :exc:`ImportWarning`." #: reference/import.rst:486 msgid "Submodules" -msgstr "" +msgstr "Submodules" #: reference/import.rst:488 msgid "" @@ -668,6 +979,12 @@ msgid "" "``spam.foo``, ``spam`` will have an attribute ``foo`` which is bound to the " "submodule. Let's say you have the following directory structure::" msgstr "" +"Όταν ένα submodule φορτώνεται με οποιονδήποτε μηχανισμό (π.χ. ``importlib`` APIs, τις " +"δηλώσεις ``import`` ή ``import-from``, ή την ενσωματωμένη ``__import__()``), " +"δημιουργείται μια δέσμευση στο namespace του γονικού module προς το αντικείμενο του " +"submodule. Για παράδειγμα, αν το πακέτο ``spam`` έχει submodule ``foo``, μετά την " +"εισαγωγή του ``spam.foo``, το ``spam`` θα έχει ένα χαρακτηριστικό ``foo`` που είναι " +"δεσμευμένο στο submodule. Ας πούμε ότι έχετε την ακόλουθη δομή φακέλων::" #: reference/import.rst:495 msgid "" @@ -675,20 +992,25 @@ msgid "" " __init__.py\n" " foo.py" msgstr "" +"spam/\n" +" __init__.py\n" +" foo.py" #: reference/import.rst:499 msgid "and ``spam/__init__.py`` has the following line in it::" -msgstr "" +msgstr "και το ``spam/__init__.py`` περιέχει την ακόλουθη γραμμή::" #: reference/import.rst:501 msgid "from .foo import Foo" -msgstr "" +msgstr "from .foo import Foo" #: reference/import.rst:503 msgid "" "then executing the following puts name bindings for ``foo`` and ``Foo`` in " "the ``spam`` module::" msgstr "" +"τότε, η εκτέλεση των παρακάτω δημιουργεί δεσμεύσεις ονομάτων για τα ``foo`` και ``Foo`` " +"στο module ``spam``::" #: reference/import.rst:506 msgid "" @@ -698,6 +1020,11 @@ msgid "" ">>> spam.Foo\n" "" msgstr "" +">>> import spam\n" +">>> spam.foo\n" +"\n" +">>> spam.Foo\n" +"" #: reference/import.rst:512 msgid "" @@ -707,10 +1034,15 @@ msgid "" "foo']`` (as you would after the above import), the latter must appear as the " "``foo`` attribute of the former." msgstr "" +"Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό μπορεί να " +"φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες χαρακτηριστικό του " +"συστήματος εισαγωγής. Η αμετάβλητη συνθήκη είναι ότι, αν έχετε ``sys.modules['spam']`` " +"και ``sys.modules['spam.foo']`` (όπως θα είχατε μετά την παραπάνω εισαγωγή), το δεύτερο " +"πρέπει να εμφανίζεται ως το χαρακτηριστικό ``foo`` του πρώτου." #: reference/import.rst:521 msgid "Module specs" -msgstr "" +msgstr "Module specs" #: reference/import.rst:523 msgid "" @@ -719,6 +1051,10 @@ msgid "" "modules. The purpose of a module's spec is to encapsulate this import-" "related information on a per-module basis." msgstr "" +"Ο μηχανισμός εισαγωγής χρησιμοποιεί ποικιλία πληροφοριών για κάθε module κατά την " +"εισαγωγή, ειδικά πριν τη φόρτωση. Οι περισσότερες από αυτές τις πληροφορίες είναι " +"κοινές για όλα τα modules. Ο σκοπός του spec ενός module είναι να ενθυλακώσει αυτή την " +"πληροφορία που σχετίζεται με την εισαγωγή, σε βάση ανά module." #: reference/import.rst:528 msgid "" @@ -728,6 +1064,11 @@ msgid "" "machinery to perform the boilerplate operations of loading, whereas without " "a module spec the loader had that responsibility." msgstr "" +"Η χρήση ενός spec κατά την εισαγωγή επιτρέπει τη μεταφορά κατάστασης μεταξύ των " +"συστατικών του συστήματος εισαγωγής, π.χ. μεταξύ του finder που δημιουργεί το module " +"spec και του loader που το εκτελεί. Το σημαντικότερο είναι ότι επιτρέπει στον μηχανισμό " +"εισαγωγής να εκτελεί τις τυποποιημένες λειτουργίες φόρτωσης, ενώ χωρίς module spec αυτή " +"η ευθύνη ανήκε στον loader." #: reference/import.rst:534 msgid "" @@ -736,16 +1077,22 @@ msgid "" "interpreter startup `. The one exception is ``__main__``, where :" "attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" +"Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " +"του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται κατά την " +"εκκίνηση των του διερμηνέα`. Η μόνη εξαίρεση είναι το ``__main__``, όπου " +"το :attr:`!__spec__` :ref:`τίθεται σε None σε ορισμένες περιπτώσεις `." #: reference/import.rst:540 msgid "" "See :class:`~importlib.machinery.ModuleSpec` for details on the contents of " "the module spec." msgstr "" +"Δείτε την :class:`~importlib.machinery.ModuleSpec` για λεπτομέρειες σχετικά με τα " +"περιεχόμενα του module spec." #: reference/import.rst:548 msgid "__path__ attributes on modules" -msgstr "" +msgstr "Χαρακτηριστικά __path__ στα modules" #: reference/import.rst:550 msgid "" @@ -754,6 +1101,10 @@ msgid "" "submodules will be found. By definition, if a module has a :attr:`!__path__` " "attribute, it is a :term:`package`." msgstr "" +"Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια (ενδεχομένως " +"κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις τοποθεσίες όπου θα βρεθούν " +"τα submodules του πακέτου. Εξ ορισμού, αν ένα module έχει χαρακτηριστικό :attr:`!" +"__path__`, τότε είναι :term:`package`." #: reference/import.rst:555 msgid "" @@ -763,6 +1114,11 @@ msgid "" "during import. However, :attr:`!__path__` is typically much more constrained " "than :data:`!sys.path`." msgstr "" +"Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά την " +"εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί παρόμοια με " +"το :data:`sys.path`, δηλαδή παρέχει μια λίστα τοποθεσιών στις οποίες αναζητούνται " +"modules κατά την εισαγωγή. Ωστόσο, το :attr:`!__path__` είναι συνήθως πολύ πιο " +"περιορισμένο από το :data:`!sys.path`." #: reference/import.rst:562 msgid "" @@ -770,6 +1126,9 @@ msgid "" "__path__`. :data:`sys.path_hooks` (described below) are consulted when " "traversing a package's :attr:`!__path__`." msgstr "" +"Οι ίδιοι κανόνες που ισχύουν για το :data:`sys.path` ισχύουν επίσης και για το :attr:`!" +"__path__` ενός πακέτου. Τα :data:`sys.path_hooks` (που περιγράφονται παρακάτω) " +"λαμβάνονται υπόψη κατά τη διάσχιση του :attr:`!__path__` ενός πακέτου." #: reference/import.rst:566 msgid "" @@ -780,10 +1139,16 @@ msgid "" "containing only :attr:`!__path__` manipulation code; the import machinery " "automatically sets :attr:`!__path__` correctly for the namespace package." msgstr "" +"Το αρχείο ``__init__.py`` ενός πακέτου μπορεί να ορίζει ή να τροποποιεί το " +"χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως ο τρόπος με " +"τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. Με την υιοθέτηση " +"του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να παρέχουν αρχεία " +"``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :attr:`!__path__`· ο μηχανισμός " +"εισαγωγής ορίζει αυτόματα σωστά το :attr:`!__path__` για το namespace πακέτο." #: reference/import.rst:575 msgid "Module reprs" -msgstr "" +msgstr "Reprs των modules" #: reference/import.rst:577 msgid "" @@ -791,6 +1156,9 @@ msgid "" "attributes set above, and in the module's spec, you can more explicitly " "control the repr of module objects." msgstr "" +"Από προεπιλογή, όλα τα modules έχουν ένα χρησιμοποιήσιμο repr· ωστόσο, ανάλογα με τα " +"χαρακτηριστικά που ορίζονται παραπάνω και στο spec του module, μπορείτε να ελέγχετε πιο " +"ρητά το repr των αντικειμένων module." #: reference/import.rst:581 msgid "" @@ -801,10 +1169,16 @@ msgid "" "__file__``, and ``module.__loader__`` as input into the repr, with defaults " "for whatever information is missing." msgstr "" +"Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει να παράγει " +"repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα εισαγωγής θα " +"δημιουργήσει ένα προεπιλεγμένο repr χρησιμοποιώντας όποια πληροφορία είναι διαθέσιμη " +"στο module. Θα προσπαθήσει να χρησιμοποιήσει τα ``module.__name__``, " +"``module.__file__`` και ``module.__loader__`` ως είσοδο για το repr, με προεπιλογές για " +"οποιαδήποτε πληροφορία λείπει." #: reference/import.rst:588 msgid "Here are the exact rules used:" -msgstr "" +msgstr "Ακολουθούν οι ακριβείς κανόνες που χρησιμοποιούνται:" #: reference/import.rst:590 msgid "" @@ -812,22 +1186,29 @@ msgid "" "used to generate the repr. The \"name\", \"loader\", \"origin\", and " "\"has_location\" attributes are consulted." msgstr "" +"Αν το module έχει χαρακτηριστικό ``__spec__``, οι πληροφορίες στο spec χρησιμοποιούνται " +"για να παραχθεί το repr. Λαμβάνονται υπόψη τα χαρακτηριστικά \"name\", \"loader\", " +"\"origin\" και \"has_location\"." #: reference/import.rst:594 msgid "" "If the module has a ``__file__`` attribute, this is used as part of the " "module's repr." msgstr "" +"Αν το module έχει χαρακτηριστικό ``__file__``, αυτό χρησιμοποιείται ως μέρος του repr " +"του module." #: reference/import.rst:597 msgid "" "If the module has no ``__file__`` but does have a ``__loader__`` that is not " "``None``, then the loader's repr is used as part of the module's repr." msgstr "" +"Αν το module δεν έχει ``__file__`` αλλά έχει ``__loader__`` που δεν είναι ``None``, " +"τότε το repr του loader χρησιμοποιείται ως μέρος του repr του module." #: reference/import.rst:600 msgid "Otherwise, just use the module's ``__name__`` in the repr." -msgstr "" +msgstr "Διαφορετικά, χρησιμοποιείται απλώς το ``__name__`` του module στο repr." #: reference/import.rst:602 msgid "" @@ -835,10 +1216,13 @@ msgid "" "removed in Python 3.12 and is no longer called during the resolution of a " "module's repr." msgstr "" +"Η χρήση της :meth:`!module_repr`, η οποία ήταν δηλωμένη ως απαρχαιωμένη από την Python " +"3.4, αφαιρέθηκε στην Python 3.12 και δεν καλείται πλέον κατά την/επίλυση του repr ενός " +"module." #: reference/import.rst:610 msgid "Cached bytecode invalidation" -msgstr "" +msgstr "Ακύρωση cached bytecode" #: reference/import.rst:612 msgid "" @@ -849,6 +1233,13 @@ msgid "" "cache file by checking the stored metadata in the cache file against the " "source's metadata." msgstr "" +"Πριν η Python φορτώσει cached bytecode από ένα αρχείο ``.pyc``, ελέγχει αν η προσωρινή " +"μνήμη είναι ενημερωμένη σε σχέση με το πηγαίο αρχείο ``.py``. Από προεπιλογή, η Python " +"το κάνει αυτό αποθηκεύοντας τη χρονική σήμανση της τελευταίας τροποποίησης και το " +"μέγεθος του πηγαίου αρχείου στο αρχείο προσωρινής μνήμης κατά την εγγραφή του. Κατά το " +"χρόνο εκτέλεσης, το σύστημα εισαγωγής επικυρώνει το αρχείο προσωρινής μνήμης ελέγχοντας " +"τα αποθηκευμένα μεταδεδομένα του αρχείου προσωρινής μνήμης σε σχέση με τα μεταδεδομένα " +"του πηγαίου αρχείου." #: reference/import.rst:619 msgid "" @@ -863,16 +1254,29 @@ msgid "" "Hash-based ``.pyc`` files validation behavior may be overridden with the :" "option:`--check-hash-based-pycs` flag." msgstr "" +"Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα οποία " +"αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα μεταδεδομένα του. " +"Υπάρχουν δύο παραλλαγές των ``.pyc`` αρχείων βασισμένων σε hash: checked και unchecked. " +"Για τα checked ``.pyc`` αρχεία που βασίζονται σε hash, η Python επικυρώνει το αρχείο " +"προσωρινής μνήμης δημιουργώντας hash του πηγαίου αρχείου και συγκρίνοντας το αποτέλεσμα " +"με το hash στο αρχείο προσωρινής μνήμης. Αν ένα checked αρχείο προσωρινής μνήμης " +"βασισμένο σε hash βρεθεί μη έγκυρο, η Python το αναδημιουργεί και γράφει ένα νέο " +"checked αρχείο προσωρινής μνήμης βασισμένο σε hash. Για τα unchecked ``.pyc`` αρχεία " +"βασισμένα σε hash, η Python απλώς θεωρεί ότι το αρχείο προσωρινής μνήμης είναι έγκυρο " +"αν υπάρχει. Η συμπεριφορά επικύρωσης των ``.pyc`` αρχείων βασισμένων σε hash μπορεί να " +"υπερκαλυφθεί με τη σημαία :option:`--check-hash-based-pycs`." #: reference/import.rst:630 msgid "" "Added hash-based ``.pyc`` files. Previously, Python only supported timestamp-" "based invalidation of bytecode caches." msgstr "" +"Προστέθηκαν``.pyc`` αρχεία βασισμένα σε hash . Προηγουμένως, η Python υποστήριζε μόνο " +"ακύρωση των bytecode caches με βάση χρονικές σημάνσεις." #: reference/import.rst:636 msgid "The Path Based Finder" -msgstr "" +msgstr "Finder βασισμένος στη διαδρομή" #: reference/import.rst:641 msgid "" @@ -882,6 +1286,11 @@ msgid "" "contains a list of :term:`path entries `. Each path entry names " "a location to search for modules." msgstr "" +"Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς προεπιλεγμένους meta " +"path finders. Ένας από αυτούς, που ονομάζεται :term:`path based finder` " +"(:class:`~importlib.machinery.PathFinder`), αναζητά σε ένα :term:`import path`, το " +"οποίο περιέχει μια λίστα από :term:`path entries `. Κάθε path entry " +"ονομάζει μια τοποθεσία όπου θα αναζητηθούν modules." #: reference/import.rst:647 msgid "" @@ -889,6 +1298,10 @@ msgid "" "it traverses the individual path entries, associating each of them with a " "path entry finder that knows how to handle that particular kind of path." msgstr "" +"Ο ίδιος ο path based finder δεν «γνωρίζει» πώς να εισάγει οτιδήποτε. Αντ’ αυτού, " +"διασχίζει τις επιμέρους καταχωρήσεις διαδρομής, συσχετίζοντας το καθένα με έναν finder " +"καταχώρησης διαδρομής που γνωρίζει πώς να χειριστεί αυτόν τον συγκεκριμένο τύπο " +"διαδρομής." #: reference/import.rst:651 msgid "" @@ -900,6 +1313,13 @@ msgid "" "also handle loading all of these file types (other than shared libraries) " "from zipfiles." msgstr "" +"Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη σημασιολογία για " +"την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο ειδικούς τύπους αρχείων όπως " +"πηγαίο κώδικα Python (αρχεία ``.py``), byte code Python (αρχεία ``.pyc``) και " +"κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``.so``). Όταν υποστηρίζεται από το " +"module :mod:`zipimport` της τυπικής βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης " +"διαδρομής χειρίζονται επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από " +"κοινόχρηστες βιβλιοθήκες) από zipfiles." #: reference/import.rst:658 msgid "" @@ -907,6 +1327,9 @@ msgid "" "to URLs, database queries, or any other location that can be specified as a " "string." msgstr "" +"Οι καταχωρήσεις διαδρομής δεν χρειάζεται να περιορίζονται σε τοποθεσίες του συστήματος " +"αρχείων. Μπορούν να αναφέρονται σε URLs, σε ερωτήματα βάσεων δεδομένων ή σε οποιαδήποτε " +"άλλη τοποθεσία που μπορεί να εκφραστεί ως συμβολοσειρά." #: reference/import.rst:662 msgid "" @@ -918,6 +1341,14 @@ msgid "" "protocol described below, which was then used to get a loader for the module " "from the web." msgstr "" +"Ο path based finder παρέχει επιπλέον hooks και πρωτόκολλα ώστε να μπορείτε να " +"επεκτείνετε και να προσαρμόσετε τους τύπους των καταχωρήσεων διαδρομής που μπορούν να " +"αναζητηθούν. Για παράδειγμα, αν θέλατε να υποστηρίξετε καταχωρήσεις διαδρομής ως " +"network URLs, θα μπορούσατε να γράψετε ένα hook που υλοποιεί HTTP σημασιολογία για να " +"βρίσκει modules στο διαδίκτυο. Αυτό το hook (ένα callable) θα επέστρεφε " +"έναν :term:`path entry finder` που υποστηρίζει το πρωτόκολλο που περιγράφεται παρακάτω, " +"και στη συνέχεια θα χρησιμοποιούνταν για να ληφθεί ένας loader για το module από το " +"διαδίκτυο." #: reference/import.rst:670 msgid "" @@ -929,6 +1360,13 @@ msgid "" "In particular, meta path finders operate at the beginning of the import " "process, as keyed off the :data:`sys.meta_path` traversal." msgstr "" +"Μια προειδοποίηση: αυτή η ενότητα και η προηγούμενη χρησιμοποιούν και οι δύο τον όρο " +"*finder*, διακρίνοντάς τους με τους όρους :term:`meta path finder` και :term:`path " +"entry finder`. Αυτοί οι δύο τύποι finders είναι πολύ παρόμοιοι, υποστηρίζουν παρόμοια " +"πρωτόκολλα και λειτουργούν με παρόμοιο τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι " +"σημαντικό να θυμάστε ότι έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders " +"λειτουργούν στην αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση " +"του :data:`sys.meta_path`." #: reference/import.rst:678 msgid "" @@ -937,10 +1375,14 @@ msgid "" "removed from :data:`sys.meta_path`, none of the path entry finder semantics " "would be invoked." msgstr "" +"Αντίθετα, οι path entry finders είναι κατά κάποιον τρόπο μια λεπτομέρεια υλοποίησης του " +"path based finder και, στην πραγματικότητα, αν ο path based finder αφαιρούνταν από " +"το :data:`sys.meta_path`, δεν θα ενεργοποιούνταν καθόλου η σημασιολογία των finders " +"καταχώρησης διαδρομής." #: reference/import.rst:685 msgid "Path entry finders" -msgstr "" +msgstr "Finders καταχώρησης διαδρομής (Path entry finders)" #: reference/import.rst:693 msgid "" @@ -949,6 +1391,10 @@ msgid "" "entry`. Most path entries name locations in the file system, but they need " "not be limited to this." msgstr "" +"Ο :term:`path based finder` είναι υπεύθυνος για την εύρεση και φόρτωση Python modules " +"και πακέτων των οποίων η τοποθεσία καθορίζεται με μία συμβολοσειρά :term:`path entry`. " +"Οι περισσότερες καταχωρήσεις διαδρομής (path entries) δηλώνουν τοποθεσίες στο σύστημα " +"αρχείων, αλλά δεν περιορίζονται απαραίτητα σε αυτό." #: reference/import.rst:698 msgid "" @@ -957,6 +1403,10 @@ msgid "" "however it exposes additional hooks that can be used to customize how " "modules are found and loaded from the :term:`import path`." msgstr "" +"Ως meta path finder, ο :term:`path based finder` υλοποιεί το " +"πρωτόκολλο :meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε " +"προηγουμένως, ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " +"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import path`." #: reference/import.rst:703 msgid "" @@ -965,6 +1415,10 @@ msgid "" "``__path__`` attributes on package objects are also used. These provide " "additional ways that the import machinery can be customized." msgstr "" +"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based " +"finder`: :data:`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " +"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα πακέτου. Αυτά " +"παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού εισαγωγής." #: reference/import.rst:708 msgid "" @@ -977,6 +1431,14 @@ msgid "" "database queries. Only strings should be present on :data:`sys.path`; all " "other data types are ignored." msgstr "" +"Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν τοποθεσίες " +"αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη μεταβλητή " +"περιβάλλοντος :envvar:`PYTHONPATH` και από διάφορες άλλες προεπιλογές που εξαρτώνται " +"από την εγκατάσταση και την υλοποίηση. Οι εγγραφές στο :data:`sys.path` μπορεί να είναι " +"φάκελοι στο σύστημα αρχείων, zip αρχεία και ενδεχομένως άλλες «τοποθεσίες» (βλ. το " +"module :mod:`site`) στις οποίες πρέπει να γίνει αναζήτηση για modules, όπως URLs ή " +"ερωτήματα βάσεων δεδομένων. Στο :data:`sys.path` θα πρέπει να υπάρχουν μόνο " +"συμβολοσειρές· όλοι οι άλλοι τύποι δεδομένων αγνοούνται." #: reference/import.rst:717 msgid "" @@ -989,6 +1451,14 @@ msgid "" "within that package. If the ``path`` argument is ``None``, this indicates a " "top level import and :data:`sys.path` is used." msgstr "" +"Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο μηχανισμός " +"εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας τη " +"μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based finder, όπως " +"περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` " +"στη :meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα από " +"συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό ``__path__`` ενός " +"πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το όρισμα ``path`` είναι ``None``, " +"αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου και χρησιμοποιείται το :data:`sys.path`." #: reference/import.rst:726 msgid "" @@ -1005,6 +1475,18 @@ msgid "" "cache entries from :data:`sys.path_importer_cache` forcing the path based " "finder to perform the path entry search again." msgstr "" +"Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή αναζήτησης και, " +"για καθεμία, αναζητά έναν κατάλληλο :term:`path entry finder` " +"(:class:`~importlib.abc.PathEntryFinder`) για τη συγκεκριμένη καταχώρηση διαδρομής. " +"Επειδή αυτό μπορεί να είναι δαπανηρή λειτουργία (π.χ. μπορεί να υπάρχει overhead από " +"κλήσεις ``stat()`` για αυτή την αναζήτηση), ο path based finder διατηρεί μια προσωρινή " +"μνήμη που αντιστοιχίζει καταχωρήσεις διαδρομής σε path entry finders. Αυτή η προσωρινή " +"μνήμη διατηρείται στο :data:`sys.path_importer_cache` (παρά το όνομα, αυτή η προσωρινή " +"μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` αντικείμενα). Με " +"αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path entry` finder μιας " +"συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία φορά. Ο κώδικας του χρήστη μπορεί " +"να αφαιρεί εγγραφές από το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based " +"finder να εκτελέσει ξανά την αναζήτηση." #: reference/import.rst:739 msgid "" @@ -1021,6 +1503,19 @@ msgid "" "file system encoding, UTF-8, or something else), and if the hook cannot " "decode the argument, it should raise :exc:`ImportError`." msgstr "" +"Αν η καταχώρηση διαδρομής δεν υπάρχει στην προσωρινή μνήμη, ο path based finder " +"επαναλαμβάνεται πάνω σε κάθε callable στο :data:`sys.path_hooks`. Κάθε :term:`path " +"entry hook ` σε αυτή τη λίστα καλείται με ένα μόνο όρισμα: την " +"καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το callable μπορεί είτε να επιστρέψει " +"έναν :term:`path entry finder` που μπορεί να χειριστεί την καταχώρηση διαδρομής, είτε " +"να κάνει raise ένα :exc:`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον " +"path based finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " +"finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η επανάληψη " +"στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει είτε συμβολοσειρά " +"είτε αντικείμενο bytes· η κωδικοποίηση των bytes αντικειμένων επαφίεται στο hook (π.χ. " +"μπορεί να είναι μία κωδικοποίηση του συστήματος αρχείων, UTF-8 ή κάτι άλλο), και αν το " +"hook δεν μπορεί να κάνει αποκωδικοποίηση το όρισμα, θα πρέπει να κάνει raise " +"ένα :exc:`ImportError`." #: reference/import.rst:753 msgid "" @@ -1031,6 +1526,11 @@ msgid "" "entry) and return ``None``, indicating that this :term:`meta path finder` " "could not find the module." msgstr "" +"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :term:`path " +"entry finder`, τότε η μέθοδος :meth:`~importlib.machinery.PathFinder.find_spec` του " +"path based finder θα αποθηκεύσει ``None`` στο :data:`sys.path_importer_cache` (για να " +"δηλώσει ότι δεν υπάρχει finder για αυτη την καταχώρηση διαδρομής) και θα επιστρέψει " +"``None``, δηλώνοντας ότι αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." #: reference/import.rst:760 msgid "" @@ -1039,6 +1539,10 @@ msgid "" "used to ask the finder for a module spec, which is then used when loading " "the module." msgstr "" +"Αν *επιστραφεί* ένας :term:`path entry finder` από κάποιο από τα :term:`path entry " +"hook` callables στο :data:`sys.path_hooks`, τότε χρησιμοποιείται το ακόλουθο πρωτόκολλο " +"για να ζητηθεί από τον finder ένα module spec, το οποίο στη συνέχεια χρησιμοποιείται " +"κατά τη φόρτωση του module." #: reference/import.rst:765 msgid "" @@ -1051,10 +1555,18 @@ msgid "" "meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " "working directory and not the empty string." msgstr "" +"Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- αντιμετωπίζεται " +"λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys.path`. Πρώτον, αν δεν μπορεί να " +"προσδιοριστεί ή αν διαπιστωθεί ότι δεν υπάρχει, δεν αποθηκεύεται τιμή " +"στο :data:`sys.path_importer_cache`. Δεύτερον, η τιμή για τον τρέχοντα κατάλογο " +"εργασίας αναζητείται εκ νέου για κάθε αναζήτηση module. Τρίτον, η διαδρομή που " +"χρησιμοποιείται για το :data:`sys.path_importer_cache` και επιστρέφεται από " +"τη :meth:`importlib.machinery.PathFinder.find_spec` θα είναι ο πραγματικός τρέχων " +"κατάλογος εργασίας και όχι η κενή συμβολοσειρά." #: reference/import.rst:775 msgid "Path entry finder protocol" -msgstr "" +msgstr "Πρωτόκολλο path entry finder" #: reference/import.rst:777 msgid "" @@ -1062,6 +1574,9 @@ msgid "" "contribute portions to namespace packages, path entry finders must implement " "the :meth:`~importlib.abc.PathEntryFinder.find_spec` method." msgstr "" +"Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, καθώς και " +"για τη συνεισφορά portions σε namespace πακέτα, οι path entry finders πρέπει να " +"υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder.find_spec`." #: reference/import.rst:781 msgid "" @@ -1070,6 +1585,10 @@ msgid "" "module. ``find_spec()`` returns a fully populated spec for the module. This " "spec will always have \"loader\" set (with one exception)." msgstr "" +"Η :meth:`~importlib.abc.PathEntryFinder.find_spec` παίρνει δύο ορίσματα: το πλήρως " +"αναγνωρισμένο όνομα του module που εισάγεται και το (προαιρετικό) target module. Η " +"``find_spec()`` επιστρέφει ένα πλήρως συμπληρωμένο spec για το module. Αυτό το spec θα " +"έχει πάντα ορισμένο το \"loader\" (με μία εξαίρεση)." #: reference/import.rst:786 msgid "" @@ -1077,6 +1596,9 @@ msgid "" "term:`portion`, the path entry finder sets ``submodule_search_locations`` to " "a list containing the portion." msgstr "" +"Για να δηλώσει στον μηχανισμό εισαγωγής ότι το spec αναπαριστά ένα " +"namespace :term:`portion`, ο path entry finder ορίζει το ``submodule_search_locations`` " +"σε μια λίστα που περιέχει το portion." #: reference/import.rst:790 msgid "" @@ -1084,6 +1606,9 @@ msgid "" "find_loader` and :meth:`!find_module`, both of which are now deprecated, but " "will be used if ``find_spec()`` is not defined." msgstr "" +"Η :meth:`~importlib.abc.PathEntryFinder.find_spec` αντικατέστησε τις :meth:`!" +"find_loader` και :meth:`!find_module`, οι οποίες έχουν πλέον χαρακτηριστεί ως " +"απαρχαιωμένες, αλλά θα χρησιμοποιηθούν αν δεν ορίζεται η ``find_spec()``." #: reference/import.rst:796 msgid "" @@ -1092,6 +1617,10 @@ msgid "" "backward compatibility. However, if ``find_spec()`` is implemented on the " "path entry finder, the legacy methods are ignored." msgstr "" +"Παλαιότεροι path entry finders μπορεί να υλοποιούν μία από αυτές τις δύο απαρχαιωμένες " +"μεθόδους αντί για την ``find_spec()``. Οι μέθοδοι αυτές εξακολουθούν να γίνονται δεκτές " +"για λόγους συμβατότητας προς τα πίσω. Ωστόσο, αν ο path entry finder υλοποιεί " +"``find_spec()``, οι παλιές μέθοδοι αγνοούνται." #: reference/import.rst:801 msgid "" @@ -1099,6 +1628,9 @@ msgid "" "module being imported. ``find_loader()`` returns a 2-tuple where the first " "item is the loader and the second item is a namespace :term:`portion`." msgstr "" +"Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του module που " +"εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο στοιχείο είναι ο " +"loader και το δεύτερο στοιχείο είναι ένα namespace :term:`portion`." #: reference/import.rst:806 msgid "" @@ -1109,6 +1641,11 @@ msgid "" "(they are expected to record the appropriate path information from the " "initial call to the path hook)." msgstr "" +"Για συμβατότητα προς τα πίσω με άλλες υλοποιήσεις του πρωτοκόλλου εισαγωγής, πολλοί " +"path entry finders υποστηρίζουν επίσης την ίδια παραδοσιακή μέθοδο ``find_module()`` " +"που υποστηρίζουν και οι meta path finders. Ωστόσο, οι μέθοδοι ``find_module()`` των " +"path entry finders δεν καλούνται ποτέ με όρισμα ``path`` (αναμένεται να έχουν " +"καταγράψει την κατάλληλη πληροφορία διαδρομής από την αρχική κλήση του path hook)." #: reference/import.rst:813 msgid "" @@ -1118,20 +1655,27 @@ msgid "" "entry finder, the import system will always call ``find_loader()`` in " "preference to ``find_module()``." msgstr "" +"Η μέθοδος ``find_module()`` στους path entry finders έχει χαρακτηριστεί ως " +"απαρχαιωμένη, καθώς δεν επιτρέπει στον path entry finder να συνεισφέρει portions σε " +"namespace πακέτα. Αν ένας path entry finder διαθέτει και ``find_loader()`` και " +"``find_module()``, το σύστημα εισαγωγής θα καλεί πάντα την ``find_loader()`` αντί για " +"την ``find_module()``." #: reference/import.rst:819 msgid "" "Calls to :meth:`!find_module` and :meth:`!find_loader` by the import system " "will raise :exc:`ImportWarning`." msgstr "" +"Οι κλήσεις των :meth:`!find_module` και :meth:`!find_loader` από το σύστημα εισαγωγής " +"θα κάνουν raise μία :exc:`ImportWarning`." #: reference/import.rst:824 msgid "``find_module()`` and ``find_loader()`` have been removed." -msgstr "" +msgstr "Οι ``find_module()`` και ``find_loader()`` έχουν αφαιρεθεί." #: reference/import.rst:829 msgid "Replacing the standard import system" -msgstr "" +msgstr "Αντικατάσταση του τυπικού συστήματος εισαγωγής" #: reference/import.rst:831 msgid "" @@ -1139,6 +1683,9 @@ msgid "" "delete the default contents of :data:`sys.meta_path`, replacing them " "entirely with a custom meta path hook." msgstr "" +"Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος εισαγωγής " +"είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys.meta_path`, " +"αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-διαδρομής." #: reference/import.rst:835 msgid "" @@ -1148,6 +1695,11 @@ msgid "" "also be employed at the module level to only alter the behaviour of import " "statements within that module." msgstr "" +"Αν είναι αποδεκτό να αλλάξει μόνο η συμπεριφορά των δηλώσεων εισαγωγής χωρίς να " +"επηρεαστούν άλλα APIs που προσπελαύνουν το σύστημα εισαγωγής, τότε η αντικατάσταση της " +"ενσωματωμένης :func:`__import__` μπορεί να είναι αρκετή. Αυτή η τεχνική μπορεί επίσης " +"να εφαρμοστεί σε επίπεδο module ώστε να αλλάξει μόνο η συμπεριφορά των δηλώσεων " +"εισαγωγής μέσα σε εκείνο το module." #: reference/import.rst:841 msgid "" @@ -1158,10 +1710,16 @@ msgid "" "latter indicates that the meta path search should continue, while raising an " "exception terminates it immediately." msgstr "" +"Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook νωρίς στη " +"μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα εισαγωγής), αρκεί να " +"κάνετε raise το :exc:`ModuleNotFoundError` απευθείας από " +"τη :meth:`~importlib.abc.MetaPathFinder.find_spec` αντί να επιστρέψετε ``None``. Το " +"``None`` δηλώνει ότι η αναζήτηση στη μεταδιαδρομή πρέπει να συνεχιστεί, ενώ η υποβολή " +"αιτήματος εξαίρεσης την τερματίζει άμεσα." #: reference/import.rst:851 msgid "Package Relative Imports" -msgstr "" +msgstr "Σχετικές εισαγωγές σε πακέτα" #: reference/import.rst:853 msgid "" @@ -1170,6 +1728,10 @@ msgid "" "a relative import to the parent(s) of the current package, one level per dot " "after the first. For example, given the following package layout::" msgstr "" +"Οι σχετικές εισαγωγές χρησιμοποιούν τελείες στην αρχή. Μια και μόνο τελεία στην αρχή " +"δηλώνει σχετική εισαγωγή που ξεκινά από το τρέχον πακέτο. Δύο ή περισσότερες τελείες " +"δηλώνουν σχετική εισαγωγή προς το/τα γονικό/ά του τρέχοντος πακέτου, ένα επίπεδο ανά " +"τελεία μετά την πρώτη. Για παράδειγμα, με την ακόλουθη διάταξη πακέτου::" #: reference/import.rst:858 msgid "" @@ -1184,12 +1746,24 @@ msgid "" " moduleZ.py\n" " moduleA.py" msgstr "" +"package/\n" +" __init__.py\n" +" subpackage1/\n" +" __init__.py\n" +" moduleX.py\n" +" moduleY.py\n" +" subpackage2/\n" +" __init__.py\n" +" moduleZ.py\n" +" moduleA.py" #: reference/import.rst:869 msgid "" "In either ``subpackage1/moduleX.py`` or ``subpackage1/__init__.py``, the " "following are valid relative imports::" msgstr "" +"Είτε στο ``subpackage1/moduleX.py`` είτε στο ``subpackage1/__init__.py``, τα παρακάτω " +"είναι έγκυρες σχετικές εισαγωγές::" #: reference/import.rst:872 msgid "" @@ -1200,6 +1774,12 @@ msgid "" "from ..subpackage2.moduleZ import eggs\n" "from ..moduleA import foo" msgstr "" +"from .moduleY import spam\n" +"from .moduleY import spam as ham\n" +"from . import moduleY\n" +"from ..subpackage1 import moduleY\n" +"from ..subpackage2.moduleZ import eggs\n" +"from ..moduleA import foo" #: reference/import.rst:879 msgid "" @@ -1207,20 +1787,25 @@ msgid "" "syntax, but relative imports may only use the second form; the reason for " "this is that::" msgstr "" +"Οι απόλυτες εισαγωγές μπορούν να χρησιμοποιούν είτε τη σύνταξη ``import <>`` είτε τη " +"``from <> import <>``, αλλά οι σχετικές εισαγωγές μπορούν να χρησιμοποιούν μόνο τη " +"δεύτερη μορφή· ο λόγος είναι ότι::" #: reference/import.rst:883 msgid "import XXX.YYY.ZZZ" -msgstr "" +msgstr "import XXX.YYY.ZZZ" #: reference/import.rst:885 msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" +"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το .moduleY " +"δεν είναι έγκυρη έκφραση." #: reference/import.rst:892 msgid "Special considerations for __main__" -msgstr "" +msgstr "Ειδικές περιπτώσεις για το __main__" #: reference/import.rst:894 msgid "" @@ -1232,16 +1817,24 @@ msgid "" "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" +"Το module :mod:`__main__` είναι μια ειδική περίπτωση σε σχέση με το σύστημα εισαγωγής " +"της Python. Όπως σημειώνεται :ref:`αλλού `, το ``__main__`` αρχικοποιείται " +"απευθείας κατά την εκκίνηση του διερμηνέα, όπως και τα :mod:`sys` και :mod:`builtins`. " +"Ωστόσο, σε αντίθεση με αυτά τα δύο, δεν χαρακτηρίζεται αυστηρά ως ενσωματωμένο module. " +"Αυτό συμβαίνει επειδή ο τρόπος με τον οποίο αρχικοποιείται το ``__main__`` εξαρτάται " +"από τις σημαίες και άλλες επιλογές με τις οποίες καλείται ο διερμηνέας." #: reference/import.rst:905 msgid "__main__.__spec__" -msgstr "" +msgstr "__main__.__spec__" #: reference/import.rst:907 msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" +"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__.__spec__`` ορίζεται " +"κατάλληλα ή σε ``None``." #: reference/import.rst:910 msgid "" @@ -1250,6 +1843,10 @@ msgid "" "populated when the ``__main__`` module is loaded as part of executing a " "directory, zipfile or other :data:`sys.path` entry." msgstr "" +"Όταν η Python ξεκινά με την επιλογή :option:`-m`, το ``__spec__`` ορίζεται στο module " +"spec του αντίστοιχου module ή πακέτου. Το ``__spec__`` συμπληρώνεται επίσης όταν το " +"module ``__main__`` φορτώνεται ως μέρος της εκτέλεσης ενός καταλόγου, zipfile ή άλλης " +"εγγραφής του :data:`sys.path`." #: reference/import.rst:915 msgid "" @@ -1257,22 +1854,25 @@ msgid "" "__spec__`` is set to ``None``, as the code used to populate the :mod:" "`__main__` does not correspond directly with an importable module:" msgstr "" +"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__.__spec__`` " +"ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να γεμίσει " +"το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" #: reference/import.rst:919 msgid "interactive prompt" -msgstr "" +msgstr "διαδραστική προτροπή" #: reference/import.rst:920 msgid ":option:`-c` option" -msgstr "" +msgstr "επιλογή :option:`-c`" #: reference/import.rst:921 msgid "running from stdin" -msgstr "" +msgstr "εκτέλεση από stdin" #: reference/import.rst:922 msgid "running directly from a source or bytecode file" -msgstr "" +msgstr "εκτέλεση απευθείας από το αρχείο πηγαίου κώδικα ή bytecode" #: reference/import.rst:924 msgid "" @@ -1281,6 +1881,10 @@ msgid "" "the :option:`-m` switch if valid module metadata is desired in :mod:" "`__main__`." msgstr "" +"Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα ``None``, " +"*ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας ως module. " +"Χρησιμοποιήστε το switch :option:`-m` αν χρειάζεστε έγκυρα module μεταδεδομένων " +"στο :mod:`__main__`." #: reference/import.rst:929 msgid "" @@ -1290,10 +1894,15 @@ msgid "" "__name__ == \"__main__\":`` checks only execute when the module is used to " "populate the ``__main__`` namespace, and not during normal import." msgstr "" +"Σημειώστε επίσης ότι ακόμη κι όταν το ``__main__`` αντιστοιχεί σε εισαγόμενα module και " +"το ``__main__.__spec__`` ορίζεται ανάλογα, εξακολουθούν να θεωρούνται *διακριτά* " +"modules. Αυτό οφείλεται στο ότι μπλοκ κώδικα που προστατεύονται από ελέγχους ``if " +"__name__ == \"__main__\":`` εκτελούνται μόνο όταν το module χρησιμοποιείται για να " +"γεμίσει το namespace του ``__main__``, και όχι κατά την κανονική εισαγωγή." #: reference/import.rst:937 msgid "References" -msgstr "" +msgstr "Αναφορές" #: reference/import.rst:939 msgid "" @@ -1302,12 +1911,18 @@ msgid "" "packages/>`_ is still available to read, although some details have changed " "since the writing of that document." msgstr "" +"Ο μηχανισμός εισαγωγής έχει εξελιχθεί σημαντικά από τα πρώτα χρόνια της Python. Η " +"αρχική `προδιαγραφή για πακέτα `_ είναι " +"ακόμη διαθέσιμη προς ανάγνωση, αν και ορισμένες λεπτομέρειες έχουν αλλάξει από τότε που " +"γράφτηκε αυτό το κείμενο." #: reference/import.rst:944 msgid "" "The original specification for :data:`sys.meta_path` was :pep:`302`, with " "subsequent extension in :pep:`420`." msgstr "" +"Η αρχική προδιαγραφή για το :data:`sys.meta_path` ήταν το :pep:`302`, με μεταγενέστερη " +"επέκταση στο :pep:`420`." #: reference/import.rst:947 msgid "" @@ -1315,12 +1930,17 @@ msgid "" "Python 3.3. :pep:`420` also introduced the :meth:`!find_loader` protocol as " "an alternative to :meth:`!find_module`." msgstr "" +"Το :pep:`420` εισήγαγε τα :term:`namespace πακέτα ` στην Python 3.3. " +"Το :pep:`420` εισήγαγε επίσης το πρωτόκολλο :meth:`!find_loader` ως εναλλακτική " +"της :meth:`!find_module`." #: reference/import.rst:951 msgid "" ":pep:`366` describes the addition of the ``__package__`` attribute for " "explicit relative imports in main modules." msgstr "" +"Το :pep:`366` περιγράφει την προσθήκη του χαρακτηριστικού ``__package__`` για ρητές " +"σχετικές εισαγωγές σε κύρια modules." #: reference/import.rst:954 msgid "" @@ -1328,10 +1948,12 @@ msgid "" "proposed ``__name__`` for semantics :pep:`366` would eventually specify for " "``__package__``." msgstr "" +"Το :pep:`328` εισήγαγε απόλυτες και ρητές σχετικές εισαγωγές και αρχικά πρότεινε το " +"``__name__`` για τη σημασιολογία που το :pep:`366` τελικά όρισε για το ``__package__``." #: reference/import.rst:958 msgid ":pep:`338` defines executing modules as scripts." -msgstr "" +msgstr "Το :pep:`338` ορίζει την εκτέλεση modules ως scripts." #: reference/import.rst:960 msgid "" @@ -1341,14 +1963,18 @@ msgid "" "of several APIs in the import system and also addition of new methods to " "finders and loaders." msgstr "" +"Το :pep:`451` προσθέτει την ενθυλάκωση της κατάστασης εισαγωγής ανά module σε spec " +"αντικείμενα. Επίσης μεταφέρει το μεγαλύτερο μέρος των τυποποιημένων ευθυνών των loaders " +"πίσω στον μηχανισμό εισαγωγής. Αυτές οι αλλαγές επιτρέπουν την απόσυρση αρκετών APIs " +"στο σύστημα εισαγωγής και επίσης την προσθήκη νέων μεθόδων σε finders και loaders." #: reference/import.rst:967 msgid "Footnotes" -msgstr "" +msgstr "Υποσημειώσεις" #: reference/import.rst:968 msgid "See :class:`types.ModuleType`." -msgstr "" +msgstr "Δείτε την :class:`types.ModuleType`." #: reference/import.rst:970 msgid "" @@ -1358,95 +1984,101 @@ msgid "" "replace itself in :data:`sys.modules`. This is implementation-specific " "behavior that is not guaranteed to work in other Python implementations." msgstr "" +"Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή επιστροφής. Αντ’ " +"αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα του module " +"στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα εισηγμένο module μπορεί να " +"αντικαταστήσει τον εαυτό του στο :data:`sys.modules`. Αυτή είναι μία ειδική συμπεριφορά " +"της συγκεκριμένης υλοποίησης και δεν είναι εγγυημένο ότι λειτουργεί σε άλλες " +"υλοποιήσεις της Python." #: reference/import.rst:8 msgid "import machinery" -msgstr "" +msgstr "μηχανισμός εισαγωγής" #: reference/import.rst:95 reference/import.rst:131 msgid "package" -msgstr "" +msgstr "πακέτο" #: reference/import.rst:95 msgid "regular" -msgstr "" +msgstr "κανονικό" #: reference/import.rst:131 msgid "namespace" -msgstr "" +msgstr "namespace" #: reference/import.rst:131 msgid "portion" -msgstr "" +msgstr "τμήμα (portion)" #: reference/import.rst:177 msgid "sys.modules" -msgstr "" +msgstr "sys.modules" #: reference/import.rst:278 msgid "finder" -msgstr "" +msgstr "finder" #: reference/import.rst:212 msgid "loader" -msgstr "" +msgstr "loader" #: reference/import.rst:212 msgid "module spec" -msgstr "" +msgstr "module spec" #: reference/import.rst:251 msgid "import hooks" -msgstr "" +msgstr "hooks εισαγωγής" #: reference/import.rst:251 msgid "meta hooks" -msgstr "" +msgstr "meta hooks" #: reference/import.rst:251 msgid "path hooks" -msgstr "" +msgstr "hooks διαδρομής" #: reference/import.rst:251 msgid "hooks" -msgstr "" +msgstr "hooks" #: reference/import.rst:251 msgid "import" -msgstr "" +msgstr "εισαγωγή" #: reference/import.rst:251 msgid "meta" -msgstr "" +msgstr "meta" #: reference/import.rst:251 msgid "path" -msgstr "" +msgstr "διαδρομή" #: reference/import.rst:278 msgid "sys.meta_path" -msgstr "" +msgstr "sys.meta_path" #: reference/import.rst:278 msgid "find_spec" -msgstr "" +msgstr "find_spec" #: reference/import.rst:638 msgid "path based finder" -msgstr "" +msgstr "path based finder" #: reference/import.rst:687 msgid "sys.path" -msgstr "" +msgstr "sys.path" #: reference/import.rst:687 msgid "sys.path_hooks" -msgstr "" +msgstr "sys.path_hooks" #: reference/import.rst:687 msgid "sys.path_importer_cache" -msgstr "" +msgstr "sys.path_importer_cache" #: reference/import.rst:687 msgid "PYTHONPATH" -msgstr "" +msgstr "PYTHONPATH" From 1bb5abc8e69bba3497397273dec2fd2a2a2d94c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:58:12 +0000 Subject: [PATCH 02/17] [pre-commit.ci lite] apply automatic fixes --- reference/import.po | 1196 +++++++++++++++++++++++-------------------- 1 file changed, 633 insertions(+), 563 deletions(-) diff --git a/reference/import.po b/reference/import.po index c2017029..734af341 100644 --- a/reference/import.po +++ b/reference/import.po @@ -29,12 +29,12 @@ msgid "" "way. Functions such as :func:`importlib.import_module` and built-in :func:" "`__import__` can also be used to invoke the import machinery." msgstr "" -"Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός άλλου module " -"μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:`import` είναι ο πιο " -"συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού import, αλλά δεν είναι ο μόνος. " -"Συναρτήσεις όπως η :func:`importlib.import_module` και η " -"ενσωματωμένη :func:`__import__` μπορούν επίσης να χρησιμοποιηθούν για την ενεργοποίηση " -"του μηχανισμού εισαγωγής." +"Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός " +"άλλου module μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:" +"`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού " +"import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως η :func:`importlib." +"import_module` και η ενσωματωμένη :func:`__import__` μπορούν επίσης να " +"χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού εισαγωγής." #: reference/import.rst:16 msgid "" @@ -47,13 +47,14 @@ msgid "" "keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" -"Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με το " -"συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της αναζήτησης σε ένα " -"όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της δήλωσης :keyword:`!import` ορίζεται " -"ως κλήση της συνάρτησης :func:`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής " -"της :func:`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " -"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` για τις " -"ακριβείς λεπτομέρειες αυτής της λειτουργίας." +"Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με " +"το συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της " +"αναζήτησης σε ένα όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της " +"δήλωσης :keyword:`!import` ορίζεται ως κλήση της συνάρτησης :func:" +"`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής της :func:" +"`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " +"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` " +"για τις ακριβείς λεπτομέρειες αυτής της λειτουργίας." #: reference/import.rst:25 msgid "" @@ -63,11 +64,11 @@ msgid "" "(including :data:`sys.modules`), only the :keyword:`import` statement " "performs a name binding operation." msgstr "" -"Μια άμεση κλήση της :func:`__import__` εκτελεί μόνο την αναζήτηση του module και, αν " -"βρεθεί, τη λειτουργία δημιουργίας του. Παρότι μπορεί να προκύψουν ορισμένες " -"παρενέργειες, όπως η εισαγωγής των γονικών πακέτων και η ενημέρωση διάφορων προσωρινών μνημών " -"(συμπεριλαμβανομένου του :data:`sys.modules`), μόνο η δήλωση :keyword:`import` εκτελεί " -"λειτουργία δέσμευσης ονόματος." +"Μια άμεση κλήση της :func:`__import__` εκτελεί μόνο την αναζήτηση του module " +"και, αν βρεθεί, τη λειτουργία δημιουργίας του. Παρότι μπορεί να προκύψουν " +"ορισμένες παρενέργειες, όπως η εισαγωγής των γονικών πακέτων και η ενημέρωση " +"διάφορων προσωρινών μνημών (συμπεριλαμβανομένου του :data:`sys.modules`), " +"μόνο η δήλωση :keyword:`import` εκτελεί λειτουργία δέσμευσης ονόματος." #: reference/import.rst:31 msgid "" @@ -77,10 +78,10 @@ msgid "" "`__import__` and use their own solutions to implement import semantics." msgstr "" "Όταν εκτελείται μια δήλωση :keyword:`import`, καλείται η τυπική ενσωματωμένη " -"συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος εισαγωγής " -"(όπως η :func:`importlib.import_module`) μπορεί να επιλέξουν να παρακάμψουν " -"τη :func:`__import__` και να χρησιμοποιήσουν δικές τους λύσεις για την υλοποίηση της " -"σημασιολογίας της εισαγωγής." +"συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος " +"εισαγωγής (όπως η :func:`importlib.import_module`) μπορεί να επιλέξουν να " +"παρακάμψουν τη :func:`__import__` και να χρησιμοποιήσουν δικές τους λύσεις " +"για την υλοποίηση της σημασιολογίας της εισαγωγής." #: reference/import.rst:36 msgid "" @@ -91,13 +92,13 @@ msgid "" "machinery is invoked. These strategies can be modified and extended by " "using various hooks described in the sections below." msgstr "" -"Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το βρει, " -"δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το module με το " -"συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η " -"εξαίρεση :exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " -"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι στρατηγικές μπορούν να " -"τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks που περιγράφονται στις παρακάτω " -"ενότητες." +"Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το " +"βρει, δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το " +"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η εξαίρεση :" +"exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " +"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι " +"στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks " +"που περιγράφονται στις παρακάτω ενότητες." #: reference/import.rst:43 msgid "" @@ -107,9 +108,10 @@ msgid "" "namespace package support has been implemented (see :pep:`420`)." msgstr "" "Το σύστημα εισαγωγής έχει ενημερωθεί ώστε να υλοποιεί πλήρως τη δεύτερη φάση " -"του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο πλήρης " -"μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. Επιπλέον, έχει υλοποιηθεί " -"εγγενής υποστήριξη για namespace packages (βλ. :pep:`420`)." +"του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο " +"πλήρης μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. " +"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages (βλ. :" +"pep:`420`)." #: reference/import.rst:51 msgid ":mod:`importlib`" @@ -123,11 +125,11 @@ msgid "" "import machinery. Refer to the :mod:`importlib` library documentation for " "additional detail." msgstr "" -"Το module :mod:`importlib` παρέχει ένα πλούσιο API για αλληλεπίδραση με το σύστημα " -"εισαγωγής. Για παράδειγμα, η :func:`importlib.import_module` παρέχει ένα προτεινόμενο, " -"απλούστερο API από την ενσωματωμένη :func:`__import__` για την ενεργοποίηση του " -"μηχανισμού εισαγωγής. Ανατρέξτε στην τεκμηρίωση της βιβλιοθήκης :mod:`importlib` για " -"περισσότερες λεπτομέρειες." +"Το module :mod:`importlib` παρέχει ένα πλούσιο API για αλληλεπίδραση με το " +"σύστημα εισαγωγής. Για παράδειγμα, η :func:`importlib.import_module` παρέχει " +"ένα προτεινόμενο, απλούστερο API από την ενσωματωμένη :func:`__import__` για " +"την ενεργοποίηση του μηχανισμού εισαγωγής. Ανατρέξτε στην τεκμηρίωση της " +"βιβλιοθήκης :mod:`importlib` για περισσότερες λεπτομέρειες." #: reference/import.rst:62 msgid "Packages" @@ -140,10 +142,11 @@ msgid "" "else. To help organize modules and provide a naming hierarchy, Python has a " "concept of :term:`packages `." msgstr "" -"Η Python έχει μόνο έναν τύπο αντικειμένου module, και όλα τα modules είναι αυτού του " -"τύπου, ανεξάρτητα από το αν το module υλοποιείται σε Python, C ή κάτι άλλο. Για να " -"βοηθήσει στην οργάνωση των modules και να παρέχει μια ιεραρχία ονοματοδοσίας, η Python " -"διαθέτει την έννοια των :term:`packages `." +"Η Python έχει μόνο έναν τύπο αντικειμένου module, και όλα τα modules είναι " +"αυτού του τύπου, ανεξάρτητα από το αν το module υλοποιείται σε Python, C ή " +"κάτι άλλο. Για να βοηθήσει στην οργάνωση των modules και να παρέχει μια " +"ιεραρχία ονοματοδοσίας, η Python διαθέτει την έννοια των :term:`packages " +"`." #: reference/import.rst:72 msgid "" @@ -155,12 +158,13 @@ msgid "" "hierarchically, and packages may themselves contain subpackages, as well as " "regular modules." msgstr "" -"Μπορείτε να σκεφτείτε τα packages ως φακέλους σε ένα σύστημα αρχείων και τα modules ως " -"αρχεία μέσα σε φακέλους, αλλά μην πάρετε αυτή την αναλογία κυριολεκτικά, καθώς packages " -"και modules δεν είναι απαραίτητο να προέρχονται από το σύστημα αρχείων. Για τους " -"σκοπούς αυτής της τεκμηρίωσης, θα χρησιμοποιήσουμε αυτή τη βολική αναλογία φακέλων και " -"αρχείων. Όπως οι φάκελοι του συστήματος αρχείων, τα packages οργανώνονται ιεραρχικά, " -"και μπορούν να περιέχουν subpackages, καθώς και κανονικά modules." +"Μπορείτε να σκεφτείτε τα packages ως φακέλους σε ένα σύστημα αρχείων και τα " +"modules ως αρχεία μέσα σε φακέλους, αλλά μην πάρετε αυτή την αναλογία " +"κυριολεκτικά, καθώς packages και modules δεν είναι απαραίτητο να προέρχονται " +"από το σύστημα αρχείων. Για τους σκοπούς αυτής της τεκμηρίωσης, θα " +"χρησιμοποιήσουμε αυτή τη βολική αναλογία φακέλων και αρχείων. Όπως οι " +"φάκελοι του συστήματος αρχείων, τα packages οργανώνονται ιεραρχικά, και " +"μπορούν να περιέχουν subpackages, καθώς και κανονικά modules." #: reference/import.rst:80 msgid "" @@ -169,9 +173,10 @@ msgid "" "of module. Specifically, any module that contains a ``__path__`` attribute " "is considered a package." msgstr "" -"Είναι σημαντικό να έχετε υπόψη ότι όλα τα packages είναι modules, αλλά δεν είναι όλα τα " -"modules packages. Με άλλα λόγια, τα packages είναι απλώς ένας ειδικός τύπος module. " -"Συγκεκριμένα, οποιοδήποτε module περιέχει το χαρακτηριστικό ``__path__`` θεωρείται package." +"Είναι σημαντικό να έχετε υπόψη ότι όλα τα packages είναι modules, αλλά δεν " +"είναι όλα τα modules packages. Με άλλα λόγια, τα packages είναι απλώς ένας " +"ειδικός τύπος module. Συγκεκριμένα, οποιοδήποτε module περιέχει το " +"χαρακτηριστικό ``__path__`` θεωρείται package." #: reference/import.rst:85 msgid "" @@ -181,11 +186,12 @@ msgid "" "subpackage called :mod:`email.mime` and a module within that subpackage " "called :mod:`email.mime.text`." msgstr "" -"Όλα τα modules έχουν ένα όνομα. Τα ονόματα των subpackages διαχωρίζονται από το όνομα " -"του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη πρόσβασης σε " -"χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package με όνομα :mod:`email`, το " -"οποίο με τη σειρά του έχει ένα subpackage με όνομα :mod:`email.mime` και ένα module " -"μέσα σε αυτό το subpackage με όνομα :mod:`email.mime.text`." +"Όλα τα modules έχουν ένα όνομα. Τα ονόματα των subpackages διαχωρίζονται από " +"το όνομα του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη " +"πρόσβασης σε χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package " +"με όνομα :mod:`email`, το οποίο με τη σειρά του έχει ένα subpackage με " +"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με όνομα :" +"mod:`email.mime.text`." #: reference/import.rst:93 msgid "Regular packages" @@ -203,23 +209,24 @@ msgid "" "same Python code that any other module can contain, and Python will add some " "additional attributes to the module when it is imported." msgstr "" -"Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και " -"τα :term:`namespace packages `. Τα regular packages είναι τα " -"παραδοσιακά packages όπως υπήρχαν στην Python 3.2 και παλαιότερα. Ένα regular package " -"υλοποιείται συνήθως ως φάκελος που περιέχει ένα αρχείο ``__init__.py``. Όταν " -"εισάγεται ένα regular package, το αρχείο ``__init__.py`` εκτελείται έμμεσα, και τα " -"αντικείμενα που ορίζει δεσμεύονται σε ονόματα στο namespace του package. Το " -"``__init__.py`` μπορεί να περιέχει τον ίδιο κώδικα Python που μπορεί να περιέχει " -"οποιοδήποτε άλλο module, και η Python θα προσθέσει ορισμένα επιπλέον χαρακτηριστικά στο " -"module όταν εισάγεται." +"Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και τα :term:`namespace packages `. Τα regular " +"packages είναι τα παραδοσιακά packages όπως υπήρχαν στην Python 3.2 και " +"παλαιότερα. Ένα regular package υλοποιείται συνήθως ως φάκελος που περιέχει " +"ένα αρχείο ``__init__.py``. Όταν εισάγεται ένα regular package, το αρχείο " +"``__init__.py`` εκτελείται έμμεσα, και τα αντικείμενα που ορίζει δεσμεύονται " +"σε ονόματα στο namespace του package. Το ``__init__.py`` μπορεί να περιέχει " +"τον ίδιο κώδικα Python που μπορεί να περιέχει οποιοδήποτε άλλο module, και η " +"Python θα προσθέσει ορισμένα επιπλέον χαρακτηριστικά στο module όταν " +"εισάγεται." #: reference/import.rst:108 msgid "" -"For example, the following file system layout defines a top level ``parent`` package " -"with three subpackages::" +"For example, the following file system layout defines a top level ``parent`` " +"package with three subpackages::" msgstr "" -"Για παράδειγμα, η ακόλουθη διάταξη στο σύστημα αρχείων ορίζει ένα package ανωτέρου " -"επιπέδου ``parent`` με τρία subpackages::" +"Για παράδειγμα, η ακόλουθη διάταξη στο σύστημα αρχείων ορίζει ένα package " +"ανωτέρου επιπέδου ``parent`` με τρία subpackages::" #: reference/import.rst:111 msgid "" @@ -248,10 +255,10 @@ msgid "" "``parent.three`` will execute ``parent/two/__init__.py`` and ``parent/three/" "__init__.py`` respectively." msgstr "" -"Η εισαγωγή του ``parent.one`` θα εκτελέσει έμμεσα τα ``parent/__init__.py`` και " -"``parent/one/__init__.py``. Μετέπειτα εισαγωγές του ``parent.two`` ή του " -"``parent.three`` θα εκτελέσουν τα ``parent/two/__init__.py`` και ``parent/three/" -"__init__.py`` αντίστοιχα." +"Η εισαγωγή του ``parent.one`` θα εκτελέσει έμμεσα τα ``parent/__init__.py`` " +"και ``parent/one/__init__.py``. Μετέπειτα εισαγωγές του ``parent.two`` ή του " +"``parent.three`` θα εκτελέσουν τα ``parent/two/__init__.py`` και ``parent/" +"three/__init__.py`` αντίστοιχα." #: reference/import.rst:129 msgid "Namespace packages" @@ -267,12 +274,13 @@ msgid "" "objects on the file system; they may be virtual modules that have no " "concrete representation." msgstr "" -"Ένα namespace πακέτο είναι ένας συνδυασμός από διάφορα :term:`portions `, όπου " -"κάθε portion συνεισφέρει ένα subpackage στο γονικό πακέτο. Τα portions μπορεί να " -"βρίσκονται σε διαφορετικές τοποθεσίες στο σύστημα αρχείων. Μπορεί επίσης να βρίσκονται " -"σε zip αρχεία, στο δίκτυο ή οπουδήποτε αλλού αναζητά η Python κατά την εισαγωγή. Τα " -"namespace πακέτα μπορεί να αντιστοιχούν ή να μην αντιστοιχούν άμεσα σε αντικείμενα στο " -"σύστημα αρχείων· μπορεί να είναι «εικονικά» modules που δεν έχουν συγκεκριμένη φυσική " +"Ένα namespace πακέτο είναι ένας συνδυασμός από διάφορα :term:`portions " +"`, όπου κάθε portion συνεισφέρει ένα subpackage στο γονικό πακέτο. " +"Τα portions μπορεί να βρίσκονται σε διαφορετικές τοποθεσίες στο σύστημα " +"αρχείων. Μπορεί επίσης να βρίσκονται σε zip αρχεία, στο δίκτυο ή οπουδήποτε " +"αλλού αναζητά η Python κατά την εισαγωγή. Τα namespace πακέτα μπορεί να " +"αντιστοιχούν ή να μην αντιστοιχούν άμεσα σε αντικείμενα στο σύστημα αρχείων· " +"μπορεί να είναι «εικονικά» modules που δεν έχουν συγκεκριμένη φυσική " "αναπαράσταση." #: reference/import.rst:143 @@ -283,11 +291,12 @@ msgid "" "that package if the path of their parent package (or :data:`sys.path` for a " "top level package) changes." msgstr "" -"Τα namespace πακέτα δεν χρησιμοποιούν μια συνηθισμένη λίστα για το χαρακτηριστικό " -"``__path__``. Αντί γι’ αυτό χρησιμοποιούν έναν προσαρμοσμένο iterable τύπο, ο οποίος θα " -"εκτελέσει αυτόματα νέα αναζήτηση για portions του πακέτου στην επόμενη προσπάθεια " -"εισαγωγής μέσα σε αυτό το πακέτο, αν αλλάξει το path του γονικού πακέτου (ή " -"το :data:`sys.path` για πακέτο ανωτέρου επιπέδου)." +"Τα namespace πακέτα δεν χρησιμοποιούν μια συνηθισμένη λίστα για το " +"χαρακτηριστικό ``__path__``. Αντί γι’ αυτό χρησιμοποιούν έναν προσαρμοσμένο " +"iterable τύπο, ο οποίος θα εκτελέσει αυτόματα νέα αναζήτηση για portions του " +"πακέτου στην επόμενη προσπάθεια εισαγωγής μέσα σε αυτό το πακέτο, αν αλλάξει " +"το path του γονικού πακέτου (ή το :data:`sys.path` για πακέτο ανωτέρου " +"επιπέδου)." #: reference/import.rst:149 msgid "" @@ -298,12 +307,13 @@ msgid "" "create a namespace package for the top-level ``parent`` package whenever it " "or one of its subpackages is imported." msgstr "" -"Με τα namespace πακέτα, δεν υπάρχει αρχείο ``parent/__init__.py``. Στην πράξη, μπορεί " -"να βρεθούν πολλοί φάκελοι ``parent`` κατά την αναζήτηση εισαγωγής, όπου ο καθένας " -"παρέχεται από διαφορετικό portion. Έτσι, το ``parent/one`` ενδέχεται να μην βρίσκεται " -"φυσικά δίπλα στο ``parent/two``. Σε αυτή την περίπτωση, η Python θα δημιουργήσει ένα " -"namespace πακέτο για το πακέτο ανωτέρου επιπέδου ``parent`` κάθε φορά που γίνεται " -"εισαγωγή αυτού ή κάποιου από τα subpackages του." +"Με τα namespace πακέτα, δεν υπάρχει αρχείο ``parent/__init__.py``. Στην " +"πράξη, μπορεί να βρεθούν πολλοί φάκελοι ``parent`` κατά την αναζήτηση " +"εισαγωγής, όπου ο καθένας παρέχεται από διαφορετικό portion. Έτσι, το " +"``parent/one`` ενδέχεται να μην βρίσκεται φυσικά δίπλα στο ``parent/two``. " +"Σε αυτή την περίπτωση, η Python θα δημιουργήσει ένα namespace πακέτο για το " +"πακέτο ανωτέρου επιπέδου ``parent`` κάθε φορά που γίνεται εισαγωγή αυτού ή " +"κάποιου από τα subpackages του." #: reference/import.rst:156 msgid "See also :pep:`420` for the namespace package specification." @@ -322,11 +332,12 @@ msgid "" "parameters to the :func:`importlib.import_module` or :func:`__import__` " "functions." msgstr "" -"Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως αναγνωρισμένο " -"` όνομα του module (ή του πακέτου, αλλά για τους σκοπούς αυτής της " -"συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. Αυτό το όνομα μπορεί να προέρχεται " -"από διάφορα ορίσματα της δήλωσης :keyword:`import` ή από τις παραμέτρους των " -"συναρτήσεων :func:`importlib.import_module` ή :func:`__import__`." +"Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως " +"αναγνωρισμένο ` όνομα του module (ή του πακέτου, αλλά για " +"τους σκοπούς αυτής της συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. " +"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της δήλωσης :keyword:" +"`import` ή από τις παραμέτρους των συναρτήσεων :func:`importlib." +"import_module` ή :func:`__import__`." #: reference/import.rst:168 msgid "" @@ -336,11 +347,12 @@ msgid "" "baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " "is raised." msgstr "" -"Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και μπορεί να " -"είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar.baz``. Σε αυτή την " -"περίπτωση, η Python πρώτα προσπαθεί να εισάγει το ``foo``, μετά το ``foo.bar`` και " -"τέλος το ``foo.bar.baz``. Αν αποτύχει κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise " -"η :exc:`ModuleNotFoundError`." +"Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και " +"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar." +"baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει το " +"``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " +"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise η :exc:" +"`ModuleNotFoundError`." #: reference/import.rst:175 msgid "The module cache" @@ -355,12 +367,12 @@ msgid "" "and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" -"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:`sys.modules`. " -"Αυτη η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των modules που έχουν εισαχθεί " -"στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων διαδρομών. Έτσι, αν το ``foo.bar.baz`` " -"είχε εισαχθεί προηγουμένως, το :data:`sys.modules` θα περιέχει εγγραφές για τα ``foo``, " -"``foo.bar`` και ``foo.bar.baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο " -"module." +"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:" +"`sys.modules`. Αυτη η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " +"modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων " +"διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί προηγουμένως, το :data:" +"`sys.modules` θα περιέχει εγγραφές για τα ``foo``, ``foo.bar`` και ``foo.bar." +"baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο module." #: reference/import.rst:187 msgid "" @@ -370,11 +382,11 @@ msgid "" "`ModuleNotFoundError` is raised. If the module name is missing, Python will " "continue searching for the module." msgstr "" -"Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` και, αν " -"υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την εισαγωγή και η " -"διαδικασία ολοκληρώνεται. Ωστόσο, αν η τιμή είναι ``None``, τότε γίνεται raise " -"το :exc:`ModuleNotFoundError`. Αν το όνομα του module λείπει, η Python θα συνεχίσει να " -"αναζητά το module." +"Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` " +"και, αν υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την " +"εισαγωγή και η διαδικασία ολοκληρώνεται. Ωστόσο, αν η τιμή είναι ``None``, " +"τότε γίνεται raise το :exc:`ModuleNotFoundError`. Αν το όνομα του module " +"λείπει, η Python θα συνεχίσει να αναζητά το module." #: reference/import.rst:193 msgid "" @@ -385,12 +397,13 @@ msgid "" "to ``None``, forcing the next import of the module to result in a :exc:" "`ModuleNotFoundError`." msgstr "" -"Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να μην " -"καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν αναφορές σε " -"αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το module με το " -"συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει ξανά στην επόμενο εισαγωγή. Το " -"κλειδί μπορεί επίσης να οριστεί σε ``None``, αναγκάζοντας την επόμενο εισαγωγή του module " -"να καταλήξει σε :exc:`ModuleNotFoundError`." +"Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να " +"μην καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν " +"αναφορές σε αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το " +"module με το συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει " +"ξανά στην επόμενο εισαγωγή. Το κλειδί μπορεί επίσης να οριστεί σε ``None``, " +"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει σε :exc:" +"`ModuleNotFoundError`." #: reference/import.rst:200 msgid "" @@ -400,11 +413,12 @@ msgid "" "reload` will reuse the *same* module object, and simply reinitialise the " "module contents by rerunning the module's code." msgstr "" -"Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την εγγραφή " -"του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε εισαγωγή το module " -"με το ίδιο όνομα, τα δύο αντικείμενα module *δεν* θα είναι τα ίδια. Αντίθετα, " -"η :func:`importlib.reload` θα επαναχρησιμοποιήσει το *ίδιο* αντικείμενο module και " -"απλώς θα επαναρχικοποιήσει τα περιεχόμενά του εκτελώντας ξανά τον κώδικα του module." +"Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την " +"εγγραφή του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε " +"εισαγωγή το module με το ίδιο όνομα, τα δύο αντικείμενα module *δεν* θα " +"είναι τα ίδια. Αντίθετα, η :func:`importlib.reload` θα επαναχρησιμοποιήσει " +"το *ίδιο* αντικείμενο module και απλώς θα επαναρχικοποιήσει τα περιεχόμενά " +"του εκτελώντας ξανά τον κώδικα του module." #: reference/import.rst:210 msgid "Finders and loaders" @@ -421,14 +435,15 @@ msgid "" "they return themselves when they find that they can load the requested " "module." msgstr "" -"Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, τότε " -"ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να φορτωθεί το " -"module. Αυτό το πρωτόκολλο αποτελείται από δύο εννοιολογικά αντικείμενα: :term:`finders " -"` και :term:`loaders `. Ο ρόλος ενός finder είναι να καθορίσει αν " -"μπορεί να βρει το module με το συγκεκριμένο όνομα, χρησιμοποιώντας όποια στρατηγική " -"γνωρίζει. Αντικείμενα που υλοποιούν και τις δύο αυτές διεπαφές αναφέρονται " -"ως :term:`importers ` - επιστρέφουν τον εαυτό τους όταν διαπιστώσουν ότι " -"μπορούν να φορτώσουν το ζητούμενο module." +"Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " +"τότε ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να " +"φορτωθεί το module. Αυτό το πρωτόκολλο αποτελείται από δύο εννοιολογικά " +"αντικείμενα: :term:`finders ` και :term:`loaders `. Ο ρόλος " +"ενός finder είναι να καθορίσει αν μπορεί να βρει το module με το " +"συγκεκριμένο όνομα, χρησιμοποιώντας όποια στρατηγική γνωρίζει. Αντικείμενα " +"που υλοποιούν και τις δύο αυτές διεπαφές αναφέρονται ως :term:`importers " +"` - επιστρέφουν τον εαυτό τους όταν διαπιστώσουν ότι μπορούν να " +"φορτώσουν το ζητούμενο module." #: reference/import.rst:225 msgid "" @@ -439,20 +454,22 @@ msgid "" "system paths or zip files. It can also be extended to search for any " "locatable resource, such as those identified by URLs." msgstr "" -"Η Python περιλαμβάνει αρκετούς προεπιλεγμένους finders και importers. Το πρώτο γνωρίζει " -"πώς να εντοπίζει built-in modules, και το δεύτερο πώς να εντοπίζει παγωμένα (frozen) " -"modules. Ένας τρίτος προεπιλεγμένος finder αναζητά modules σε ένα :term:`import path`. " -"Το :term:`import path` είναι μια λίστα από τοποθεσίες που μπορεί να είναι διαδρομές του " -"συστήματος αρχείων ή zip αρχεία. Μπορεί επίσης να επεκταθεί ώστε να αναζητά " -"οποιονδήποτε εντοπίσιμο πόρο, όπως αυτούς που προσδιορίζονται από URLs." +"Η Python περιλαμβάνει αρκετούς προεπιλεγμένους finders και importers. Το " +"πρώτο γνωρίζει πώς να εντοπίζει built-in modules, και το δεύτερο πώς να " +"εντοπίζει παγωμένα (frozen) modules. Ένας τρίτος προεπιλεγμένος finder " +"αναζητά modules σε ένα :term:`import path`. Το :term:`import path` είναι μια " +"λίστα από τοποθεσίες που μπορεί να είναι διαδρομές του συστήματος αρχείων ή " +"zip αρχεία. Μπορεί επίσης να επεκταθεί ώστε να αναζητά οποιονδήποτε " +"εντοπίσιμο πόρο, όπως αυτούς που προσδιορίζονται από URLs." #: reference/import.rst:232 msgid "" "The import machinery is extensible, so new finders can be added to extend " "the range and scope of module searching." msgstr "" -"Ο μηχανισμός εισαγωγής είναι επεκτάσιμος, επομένως μπορούν να προστεθούν νέοι finders " -"ώστε να επεκταθεί το εύρος και η κάλυψη της αναζήτησης των modules." +"Ο μηχανισμός εισαγωγής είναι επεκτάσιμος, επομένως μπορούν να προστεθούν " +"νέοι finders ώστε να επεκταθεί το εύρος και η κάλυψη της αναζήτησης των " +"modules." #: reference/import.rst:235 msgid "" @@ -461,10 +478,11 @@ msgid "" "related information, which the import machinery then uses when loading the " "module." msgstr "" -"Οι finders δεν φορτώνουν πραγματικά τα modules. Αν μπορούν να βρουν το module με το " -"συγκεκριμένο όνομα, επιστρέφουν ένα :dfn:`module spec`, δηλαδή μια ενθυλάκωση της " -"πληροφορίας που σχετίζεται με την εισαγωγή του module, την οποία ο μηχανισμός εισαγωγής " -"χρησιμοποιεί στη συνέχεια για να φορτώσει το module." +"Οι finders δεν φορτώνουν πραγματικά τα modules. Αν μπορούν να βρουν το " +"module με το συγκεκριμένο όνομα, επιστρέφουν ένα :dfn:`module spec`, δηλαδή " +"μια ενθυλάκωση της πληροφορίας που σχετίζεται με την εισαγωγή του module, " +"την οποία ο μηχανισμός εισαγωγής χρησιμοποιεί στη συνέχεια για να φορτώσει " +"το module." #: reference/import.rst:239 msgid "" @@ -472,9 +490,9 @@ msgid "" "detail, including how you can create and register new ones to extend the " "import machinery." msgstr "" -"Οι ακόλουθες ενότητες περιγράφουν πιο αναλυτικά το πρωτόκολλο για finders και loaders, " -"συμπεριλαμβανομένου του πώς μπορείτε να δημιουργήσετε και να καταχωρίσετε νέους, ώστε " -"να επεκτείνετε τον μηχανισμό εισαγωγής." +"Οι ακόλουθες ενότητες περιγράφουν πιο αναλυτικά το πρωτόκολλο για finders " +"και loaders, συμπεριλαμβανομένου του πώς μπορείτε να δημιουργήσετε και να " +"καταχωρίσετε νέους, ώστε να επεκτείνετε τον μηχανισμό εισαγωγής." #: reference/import.rst:243 msgid "" @@ -482,9 +500,10 @@ msgid "" "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" -"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:`loaders " -"`, ενώ τώρα επιστρέφουν module specs που *περιέχουν* loaders. Οι loaders " -"εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά έχουν λιγότερες ευθύνες." +"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:" +"`loaders `, ενώ τώρα επιστρέφουν module specs που *περιέχουν* " +"loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά " +"έχουν λιγότερες ευθύνες." #: reference/import.rst:249 msgid "Import hooks" @@ -496,9 +515,9 @@ msgid "" "this are the *import hooks*. There are two types of import hooks: *meta " "hooks* and *import path hooks*." msgstr "" -"Ο μηχανισμός εισαγωγής είναι σχεδιασμένος ώστε να είναι επεκτάσιμος· ο βασικός " -"μηχανισμός για αυτό είναι η *εισαγωγή hooks*. Υπάρχουν δύο τύποι εισαγωγής hooks: *meta " -"hooks* και *import path hooks*." +"Ο μηχανισμός εισαγωγής είναι σχεδιασμένος ώστε να είναι επεκτάσιμος· ο " +"βασικός μηχανισμός για αυτό είναι η *εισαγωγή hooks*. Υπάρχουν δύο τύποι " +"εισαγωγής hooks: *meta hooks* και *import path hooks*." #: reference/import.rst:263 msgid "" @@ -508,12 +527,12 @@ msgid "" "modules, or even built-in modules. Meta hooks are registered by adding new " "finder objects to :data:`sys.meta_path`, as described below." msgstr "" -"Τα meta hooks καλούνται στην αρχή της επεξεργασίας εισαγωγής, πριν συμβεί οποιαδήποτε " -"άλλη επεξεργασία εισαγωγής, εκτός από την αναζήτηση στην προσωρινή μνήμη " -"του :data:`sys.modules`. Αυτό επιτρέπει στα meta hooks να υπερκαλύπτουν την επεξεργασία " -"του :data:`sys.path`, τα παγωμένα modules ή ακόμη και τα built-in modules. Τα meta " -"hooks καταχωρίζονται προσθέτοντας νέα αντικείμενα finder στο :data:`sys.meta_path`, " -"όπως περιγράφεται παρακάτω." +"Τα meta hooks καλούνται στην αρχή της επεξεργασίας εισαγωγής, πριν συμβεί " +"οποιαδήποτε άλλη επεξεργασία εισαγωγής, εκτός από την αναζήτηση στην " +"προσωρινή μνήμη του :data:`sys.modules`. Αυτό επιτρέπει στα meta hooks να " +"υπερκαλύπτουν την επεξεργασία του :data:`sys.path`, τα παγωμένα modules ή " +"ακόμη και τα built-in modules. Τα meta hooks καταχωρίζονται προσθέτοντας νέα " +"αντικείμενα finder στο :data:`sys.meta_path`, όπως περιγράφεται παρακάτω." #: reference/import.rst:269 msgid "" @@ -522,10 +541,10 @@ msgid "" "encountered. Import path hooks are registered by adding new callables to :" "data:`sys.path_hooks` as described below." msgstr "" -"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys.path` (ή του " -"``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο στοιχείο διαδρομής. Τα " -"import path hooks καταχωρίζονται προσθέτοντας νέα callables στο :data:`sys.path_hooks`, " -"όπως περιγράφεται παρακάτω." +"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys." +"path` (ή του ``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο " +"στοιχείο διαδρομής. Τα import path hooks καταχωρίζονται προσθέτοντας νέα " +"callables στο :data:`sys.path_hooks`, όπως περιγράφεται παρακάτω." #: reference/import.rst:276 msgid "The meta path" @@ -542,14 +561,15 @@ msgid "" "finder can use any strategy it wants to determine whether it can handle the " "named module or not." msgstr "" -"Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, η Python " -"στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο περιέχει μια λίστα από meta " -"path finder αντικείμενα. Αυτοί οι finders ερωτώνται με τη σειρά για να διαπιστωθεί αν " -"γνωρίζουν πώς να χειριστούν το module. Οι meta path finders πρέπει να υλοποιούν μια " -"μέθοδο με όνομα :meth:`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία " -"ορίσματα: ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " -"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να καθορίσει αν μπορεί " -"να χειριστεί το module ή όχι." +"Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " +"η Python στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο " +"περιέχει μια λίστα από meta path finder αντικείμενα. Αυτοί οι finders " +"ερωτώνται με τη σειρά για να διαπιστωθεί αν γνωρίζουν πώς να χειριστούν το " +"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με όνομα :meth:" +"`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία ορίσματα: " +"ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " +"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να " +"καθορίσει αν μπορεί να χειριστεί το module ή όχι." #: reference/import.rst:291 msgid "" @@ -559,11 +579,12 @@ msgid "" "returning a spec, then a :exc:`ModuleNotFoundError` is raised. Any other " "exceptions raised are simply propagated up, aborting the import process." msgstr "" -"Αν ο meta path finder γνωρίζει πώς να χειριστεί το module, επιστρέφει ένα spec " -"αντικείμενο. Αν δεν μπορεί να χειριστεί το module, επιστρέφει ``None``. Αν η " -"επεξεργασία του :data:`sys.meta_path` φτάσει στο τέλος της λίστας χωρίς να επιστραφεί " -"spec, τότε γίνεται raise το :exc:`ModuleNotFoundError`. Οποιεσδήποτε άλλες εξαιρέσεις " -"γίνονται raise απλώς προωθούνται προς τα πάνω, τερματίζοντας τη διαδικασία εισαγωγής." +"Αν ο meta path finder γνωρίζει πώς να χειριστεί το module, επιστρέφει ένα " +"spec αντικείμενο. Αν δεν μπορεί να χειριστεί το module, επιστρέφει ``None``. " +"Αν η επεξεργασία του :data:`sys.meta_path` φτάσει στο τέλος της λίστας χωρίς " +"να επιστραφεί spec, τότε γίνεται raise το :exc:`ModuleNotFoundError`. " +"Οποιεσδήποτε άλλες εξαιρέσεις γίνονται raise απλώς προωθούνται προς τα πάνω, " +"τερματίζοντας τη διαδικασία εισαγωγής." #: reference/import.rst:297 msgid "" @@ -578,15 +599,17 @@ msgid "" "existing module object that will be the target of loading later. The import " "system passes in a target module only during reload." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path finders " -"καλείται με δύο ή τρία ορίσματα. Το πρώτο είναι το πλήρως αναγνωρισμένο όνομα του " -"module που εισάγεται, π.χ. ``foo.bar.baz``. Το δεύτερο όρισμα είναι οι καταχωρήσεις " -"διαδρομής που θα χρησιμοποιηθούν για την αναζήτηση του module. Για modules ανωτέρου " -"επιπέδου, το δεύτερο όρισμα είναι ``None``, αλλά για submodules ή subpackages, είναι η " -"τιμή του χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η πρόσβαση στο " -"κατάλληλο ``__path__``, γίνεται raise το :exc:`ModuleNotFoundError`. Το τρίτο όρισμα " -"είναι ένα υπάρχον αντικείμενο module που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. " -"Το σύστημα εισαγωγής περνά target module μόνο κατά την επαναφόρτωση." +"Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path " +"finders καλείται με δύο ή τρία ορίσματα. Το πρώτο είναι το πλήρως " +"αναγνωρισμένο όνομα του module που εισάγεται, π.χ. ``foo.bar.baz``. Το " +"δεύτερο όρισμα είναι οι καταχωρήσεις διαδρομής που θα χρησιμοποιηθούν για " +"την αναζήτηση του module. Για modules ανωτέρου επιπέδου, το δεύτερο όρισμα " +"είναι ``None``, αλλά για submodules ή subpackages, είναι η τιμή του " +"χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η " +"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise το :exc:" +"`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο module " +"που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα εισαγωγής " +"περνά target module μόνο κατά την επαναφόρτωση." #: reference/import.rst:308 msgid "" @@ -599,14 +622,15 @@ msgid "" "__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " "will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." msgstr "" -"Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα εισαγωγής. Για " -"παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules δεν έχει ήδη προστεθεί " -"στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` θα εκτελέσει πρώτα μία εισαγωγή " -"ανωτέρου επιπέδου, καλώντας το ``mpf.find_spec(\"foo\", None, None)`` σε κάθε meta path " -"finder (``mpf``). Αφού εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το " -"meta path για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " -"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα καλέσει το " -"``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." +"Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα " +"εισαγωγής. Για παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules " +"δεν έχει ήδη προστεθεί στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` " +"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το ``mpf." +"find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). Αφού " +"εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta path " +"για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " +"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα " +"καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." #: reference/import.rst:318 msgid "" @@ -614,9 +638,9 @@ msgid "" "always return ``None`` when anything other than ``None`` is passed as the " "second argument." msgstr "" -"Ορισμένοι meta path finders υποστηρίζουν μόνο εισαγωγές ανωτέρου επιπέδου. Αυτοί οι " -"importers θα επιστρέφουν πάντα ``None`` όταν ως δεύτερο όρισμα περάσει οτιδήποτε άλλο " -"εκτός από ``None``." +"Ορισμένοι meta path finders υποστηρίζουν μόνο εισαγωγές ανωτέρου επιπέδου. " +"Αυτοί οι importers θα επιστρέφουν πάντα ``None`` όταν ως δεύτερο όρισμα " +"περάσει οτιδήποτε άλλο εκτός από ``None``." #: reference/import.rst:322 msgid "" @@ -625,10 +649,11 @@ msgid "" "modules, and one that knows how to import modules from an :term:`import " "path` (i.e. the :term:`path based finder`)." msgstr "" -"Το προεπιλεγμένο :data:`sys.meta_path` της Python έχει τρεις meta path finders: έναν " -"που γνωρίζει πώς να εισάγει ενσωματωμένα modules, έναν που γνωρίζει πώς να εισάγει " -"παγωμένα modules, και έναν που γνωρίζει πώς να εισάγει modules από ένα :term:`import " -"path` (δηλ. τον :term:`path based finder`)." +"Το προεπιλεγμένο :data:`sys.meta_path` της Python έχει τρεις meta path " +"finders: έναν που γνωρίζει πώς να εισάγει ενσωματωμένα modules, έναν που " +"γνωρίζει πώς να εισάγει παγωμένα modules, και έναν που γνωρίζει πώς να " +"εισάγει modules από ένα :term:`import path` (δηλ. τον :term:`path based " +"finder`)." #: reference/import.rst:327 msgid "" @@ -638,10 +663,11 @@ msgid "" "if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." "find_spec`." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path finders " -"αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί ως απαρχαιωμένη. Αν " -"και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο μηχανισμός εισαγωγής θα τη δοκιμάζει " -"μόνο αν ο finder δεν υλοποιεί τη :meth:`~importlib.abc.MetaPathFinder.find_spec`." +"Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path " +"finders αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί " +"ως απαρχαιωμένη. Αν και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο " +"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί τη :meth:" +"`~importlib.abc.MetaPathFinder.find_spec`." #: reference/import.rst:334 msgid "" @@ -656,8 +682,8 @@ msgid "" ":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." "MetaPathFinder.find_spec` instead." msgstr "" -"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε " -"την :meth:`~importlib.abc.MetaPathFinder.find_spec` στη θέση της." +"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε την :meth:`~importlib." +"abc.MetaPathFinder.find_spec` στη θέση της." #: reference/import.rst:344 msgid "Loading" @@ -669,9 +695,9 @@ msgid "" "the loader it contains) when loading the module. Here is an approximation " "of what happens during the loading portion of import::" msgstr "" -"Αν και όταν βρεθεί ένα module spec, ο μηχανισμός εισαγωγής θα το χρησιμοποιήσει (και " -"τον loader που περιέχει) για να φορτώσει το module. Ακολουθεί μια προσέγγιση του τι " -"συμβαίνει στο στάδιο φόρτωσης του import::" +"Αν και όταν βρεθεί ένα module spec, ο μηχανισμός εισαγωγής θα το " +"χρησιμοποιήσει (και τον loader που περιέχει) για να φορτώσει το module. " +"Ακολουθεί μια προσέγγιση του τι συμβαίνει στο στάδιο φόρτωσης του import::" #: reference/import.rst:350 msgid "" @@ -742,8 +768,8 @@ msgid "" "If there is an existing module object with the given name in :data:`sys." "modules`, import will have already returned it." msgstr "" -"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys.modules`, " -"το import θα το έχει ήδη επιστρέψει." +"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:" +"`sys.modules`, το import θα το έχει ήδη επιστρέψει." #: reference/import.rst:384 msgid "" @@ -753,10 +779,11 @@ msgid "" "prevents unbounded recursion in the worst case and multiple loading in the " "best." msgstr "" -"Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον κώδικα του " -"module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί (άμεσα ή έμμεσα) να " -"εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys.modules` εκ των προτέρων αποτρέπει " -"ατέρμονη αναδρομή στη χειρότερη περίπτωση και πολλαπλή φόρτωση στην καλύτερη." +"Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " +"κώδικα του module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί " +"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys." +"modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη χειρότερη περίπτωση " +"και πολλαπλή φόρτωση στην καλύτερη." #: reference/import.rst:390 msgid "" @@ -766,12 +793,12 @@ msgid "" "effect, must remain in the cache. This contrasts with reloading where even " "the failing module is left in :data:`sys.modules`." msgstr "" -"Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται από " -"το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή μνήμη " -"του :data:`sys.modules`, καθώς και οποιοδήποτε module φορτώθηκε επιτυχώς ως " -"παρενέργεια, πρέπει να παραμείνει στην προσωρινή μνήμη. Αυτό έρχεται σε αντίθεση με την " -"επαναφόρτωση, όπου ακόμη και το module που αποτυγχάνει παραμένει " -"στο :data:`sys.modules`." +"Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται " +"από το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή " +"μνήμη του :data:`sys.modules`, καθώς και οποιοδήποτε module φορτώθηκε " +"επιτυχώς ως παρενέργεια, πρέπει να παραμείνει στην προσωρινή μνήμη. Αυτό " +"έρχεται σε αντίθεση με την επαναφόρτωση, όπου ακόμη και το module που " +"αποτυγχάνει παραμένει στο :data:`sys.modules`." #: reference/import.rst:396 msgid "" @@ -780,10 +807,10 @@ msgid "" "code example above), as summarized in a :ref:`later section `." msgstr "" -"Αφού δημιουργηθεί το module αλλά πριν την εκτέλεση, ο μηχανισμός εισαγωγής ορίζει τα " -"χαρακτηριστικά του module που σχετίζονται με την εισαγωγή (\"_init_module_attrs\" στο " -"παραπάνω παράδειγμα ψευδοκώδικα), όπως συνοψίζεται σε μια :ref:`μεταγενέστερη ενότητα " -"`." +"Αφού δημιουργηθεί το module αλλά πριν την εκτέλεση, ο μηχανισμός εισαγωγής " +"ορίζει τα χαρακτηριστικά του module που σχετίζονται με την εισαγωγή " +"(\"_init_module_attrs\" στο παραπάνω παράδειγμα ψευδοκώδικα), όπως " +"συνοψίζεται σε μια :ref:`μεταγενέστερη ενότητα `." #: reference/import.rst:401 msgid "" @@ -791,17 +818,17 @@ msgid "" "namespace gets populated. Execution is entirely delegated to the loader, " "which gets to decide what gets populated and how." msgstr "" -"Η εκτέλεση του module είναι η κρίσιμη στιγμή της φόρτωσης κατά την οποία γεμίζει το " -"namespace του module. Η εκτέλεση ανατίθεται εξ ολοκλήρου στον loader, ο οποίος " -"αποφασίζει τι θα συμπληρωθεί και με ποιον τρόπο." +"Η εκτέλεση του module είναι η κρίσιμη στιγμή της φόρτωσης κατά την οποία " +"γεμίζει το namespace του module. Η εκτέλεση ανατίθεται εξ ολοκλήρου στον " +"loader, ο οποίος αποφασίζει τι θα συμπληρωθεί και με ποιον τρόπο." #: reference/import.rst:405 msgid "" "The module created during loading and passed to exec_module() may not be the " "one returned at the end of import [#fnlo]_." msgstr "" -"Το module που δημιουργείται κατά τη φόρτωση και περνά στη exec_module() ενδέχεται να " -"μην είναι αυτό που επιστρέφεται στο τέλος του import [#fnlo]_." +"Το module που δημιουργείται κατά τη φόρτωση και περνά στη exec_module() " +"ενδέχεται να μην είναι αυτό που επιστρέφεται στο τέλος του import [#fnlo]_." #: reference/import.rst:408 msgid "" @@ -809,8 +836,9 @@ msgid "" "loaders. These were previously performed by the :meth:`importlib.abc.Loader." "load_module` method." msgstr "" -"Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. Αυτές " -"εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader.load_module`." +"Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. " +"Αυτές εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader." +"load_module`." #: reference/import.rst:414 msgid "Loaders" @@ -823,10 +851,11 @@ msgid "" "method with a single argument, the module object to execute. Any value " "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" -"Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση του " -"module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc.Loader.exec_module` " -"με ένα μόνο όρισμα, το αντικείμενο module που θα εκτελεστεί. Οποιαδήποτε τιμή " -"επιστρέφει η :meth:`~importlib.abc.Loader.exec_module` αγνοείται." +"Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση " +"του module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc." +"Loader.exec_module` με ένα μόνο όρισμα, το αντικείμενο module που θα " +"εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει η :meth:`~importlib.abc.Loader." +"exec_module` αγνοείται." #: reference/import.rst:421 msgid "Loaders must satisfy the following requirements:" @@ -838,9 +867,9 @@ msgid "" "dynamically loaded extension), the loader should execute the module's code " "in the module's global name space (``module.__dict__``)." msgstr "" -"Αν το module είναι Python module (σε αντίθεση με ένα ενσωματωμένο module ή δυναμικά " -"φορτωμένη επέκταση), ο loader θα πρέπει να εκτελέσει τον κώδικα του module στο καθολικό " -"namespace του module (``module.__dict__``)." +"Αν το module είναι Python module (σε αντίθεση με ένα ενσωματωμένο module ή " +"δυναμικά φορτωμένη επέκταση), ο loader θα πρέπει να εκτελέσει τον κώδικα του " +"module στο καθολικό namespace του module (``module.__dict__``)." #: reference/import.rst:427 msgid "" @@ -848,9 +877,9 @@ msgid "" "`ImportError`, although any other exception raised during :meth:`~importlib." "abc.Loader.exec_module` will be propagated." msgstr "" -"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise " -"το :exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά " -"τη :meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." +"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise το :" +"exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά τη :" +"meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." #: reference/import.rst:431 msgid "" @@ -858,9 +887,10 @@ msgid "" "the :meth:`~importlib.abc.MetaPathFinder.find_spec` method would just return " "a spec with the loader set to ``self``." msgstr "" -"Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο αντικείμενο· σε " -"αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` απλώς " -"θα επιστρέψει ένα spec με τον loader ορισμένο σε ``self``." +"Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο " +"αντικείμενο· σε αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc." +"MetaPathFinder.find_spec` απλώς θα επιστρέψει ένα spec με τον loader " +"ορισμένο σε ``self``." #: reference/import.rst:435 msgid "" @@ -871,11 +901,12 @@ msgid "" "the module object. If the method returns ``None``, the import machinery " "will create the new module itself." msgstr "" -"Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module κατά τη " -"φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader.create_module`. Παίρνει ένα " -"όρισμα, το module spec, και επιστρέφει το νέο αντικείμενο module που θα χρησιμοποιηθεί " -"κατά τη φόρτωση. Η ``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο " -"αντικείμενο module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " +"Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module " +"κατά τη φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader." +"create_module`. Παίρνει ένα όρισμα, το module spec, και επιστρέφει το νέο " +"αντικείμενο module που θα χρησιμοποιηθεί κατά τη φόρτωση. Η " +"``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο αντικείμενο " +"module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " "δημιουργήσει ο ίδιος το νέο module." #: reference/import.rst:442 @@ -888,9 +919,9 @@ msgid "" "`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " "boilerplate responsibilities of loading." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από " -"την :meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε όλες " -"τις τυποποιημένες ευθύνες της φόρτωσης." +"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από την :" +"meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε " +"όλες τις τυποποιημένες ευθύνες της φόρτωσης." #: reference/import.rst:450 msgid "" @@ -899,10 +930,10 @@ msgid "" "also implement ``exec_module()``. However, ``load_module()`` has been " "deprecated and loaders should implement ``exec_module()`` instead." msgstr "" -"Για συμβατότητα με υπάρχοντες loaders, ο μηχανισμός εισαγωγής θα χρησιμοποιήσει τη " -"μέθοδο ``load_module()`` αν υπάρχει και ο loader δεν υλοποιεί την ``exec_module()``. " -"Ωστόσο, η ``load_module()`` είναι απαρχαιωμένη και οι loaders θα πρέπει να υλοποιούν " -"την ``exec_module()``." +"Για συμβατότητα με υπάρχοντες loaders, ο μηχανισμός εισαγωγής θα " +"χρησιμοποιήσει τη μέθοδο ``load_module()`` αν υπάρχει και ο loader δεν " +"υλοποιεί την ``exec_module()``. Ωστόσο, η ``load_module()`` είναι " +"απαρχαιωμένη και οι loaders θα πρέπει να υλοποιούν την ``exec_module()``." #: reference/import.rst:455 msgid "" @@ -910,9 +941,9 @@ msgid "" "functionality described above in addition to executing the module. All the " "same constraints apply, with some additional clarification:" msgstr "" -"Η μέθοδος ``load_module()`` πρέπει να υλοποιεί όλη την τυποποιημένη λειτουργικότητα " -"φόρτωσης που περιγράφεται παραπάνω, επιπλέον της εκτέλεσης του module. Ισχύουν οι ίδιοι " -"περιορισμοί, με κάποιες επιπλέον διευκρινίσεις:" +"Η μέθοδος ``load_module()`` πρέπει να υλοποιεί όλη την τυποποιημένη " +"λειτουργικότητα φόρτωσης που περιγράφεται παραπάνω, επιπλέον της εκτέλεσης " +"του module. Ισχύουν οι ίδιοι περιορισμοί, με κάποιες επιπλέον διευκρινίσεις:" #: reference/import.rst:459 msgid "" @@ -922,19 +953,21 @@ msgid "" "exist in :data:`sys.modules`, the loader must create a new module object and " "add it to :data:`sys.modules`." msgstr "" -"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys.modules`, ο " -"loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. (Διαφορετικά, " -"η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το module με το συγκεκριμένο " -"όνομα δεν υπάρχει στο :data:`sys.modules`, ο loader πρέπει να δημιουργήσει νέο " -"αντικείμενο module και να το προσθέσει στο :data:`sys.modules`." +"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys." +"modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. " +"(Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το " +"module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " +"loader πρέπει να δημιουργήσει νέο αντικείμενο module και να το προσθέσει " +"στο :data:`sys.modules`." #: reference/import.rst:465 msgid "" "The module *must* exist in :data:`sys.modules` before the loader executes " "the module code, to prevent unbounded recursion or multiple loading." msgstr "" -"Το module *πρέπει* να υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " -"κώδικα του module, ώστε να αποτραπεί ατέρμονη αναδρομή ή πολλαπλή φόρτωση." +"Το module *πρέπει* να υπάρχει στο :data:`sys.modules` πριν ο loader " +"εκτελέσει τον κώδικα του module, ώστε να αποτραπεί ατέρμονη αναδρομή ή " +"πολλαπλή φόρτωση." #: reference/import.rst:469 msgid "" @@ -942,25 +975,26 @@ msgid "" "data:`sys.modules`, but it must remove **only** the failing module(s), and " "only if the loader itself has loaded the module(s) explicitly." msgstr "" -"Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει εισάγει " -"στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα module(s) που " -"απέτυχαν, και μόνο αν ο loader έχει φορτώσει τα module(s) αυτά ρητά." +"Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει " +"εισάγει στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα " +"module(s) που απέτυχαν, και μόνο αν ο loader έχει φορτώσει τα module(s) αυτά " +"ρητά." #: reference/import.rst:474 msgid "" "A :exc:`DeprecationWarning` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" -"Γίνεται raise η :exc:`DeprecationWarning` όταν ορίζεται η ``exec_module()`` αλλά δεν " -"ορίζεται η ``create_module()``." +"Γίνεται raise η :exc:`DeprecationWarning` όταν ορίζεται η ``exec_module()`` " +"αλλά δεν ορίζεται η ``create_module()``." #: reference/import.rst:478 msgid "" "An :exc:`ImportError` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" -"Γίνεται raise το :exc:`ImportError` όταν ορίζεται η ``exec_module()`` αλλά δεν ορίζεται " -"η ``create_module()``." +"Γίνεται raise το :exc:`ImportError` όταν ορίζεται η ``exec_module()`` αλλά " +"δεν ορίζεται η ``create_module()``." #: reference/import.rst:482 msgid "Use of ``load_module()`` will raise :exc:`ImportWarning`." @@ -979,12 +1013,13 @@ msgid "" "``spam.foo``, ``spam`` will have an attribute ``foo`` which is bound to the " "submodule. Let's say you have the following directory structure::" msgstr "" -"Όταν ένα submodule φορτώνεται με οποιονδήποτε μηχανισμό (π.χ. ``importlib`` APIs, τις " -"δηλώσεις ``import`` ή ``import-from``, ή την ενσωματωμένη ``__import__()``), " -"δημιουργείται μια δέσμευση στο namespace του γονικού module προς το αντικείμενο του " -"submodule. Για παράδειγμα, αν το πακέτο ``spam`` έχει submodule ``foo``, μετά την " -"εισαγωγή του ``spam.foo``, το ``spam`` θα έχει ένα χαρακτηριστικό ``foo`` που είναι " -"δεσμευμένο στο submodule. Ας πούμε ότι έχετε την ακόλουθη δομή φακέλων::" +"Όταν ένα submodule φορτώνεται με οποιονδήποτε μηχανισμό (π.χ. ``importlib`` " +"APIs, τις δηλώσεις ``import`` ή ``import-from``, ή την ενσωματωμένη " +"``__import__()``), δημιουργείται μια δέσμευση στο namespace του γονικού " +"module προς το αντικείμενο του submodule. Για παράδειγμα, αν το πακέτο " +"``spam`` έχει submodule ``foo``, μετά την εισαγωγή του ``spam.foo``, το " +"``spam`` θα έχει ένα χαρακτηριστικό ``foo`` που είναι δεσμευμένο στο " +"submodule. Ας πούμε ότι έχετε την ακόλουθη δομή φακέλων::" #: reference/import.rst:495 msgid "" @@ -1009,8 +1044,8 @@ msgid "" "then executing the following puts name bindings for ``foo`` and ``Foo`` in " "the ``spam`` module::" msgstr "" -"τότε, η εκτέλεση των παρακάτω δημιουργεί δεσμεύσεις ονομάτων για τα ``foo`` και ``Foo`` " -"στο module ``spam``::" +"τότε, η εκτέλεση των παρακάτω δημιουργεί δεσμεύσεις ονομάτων για τα ``foo`` " +"και ``Foo`` στο module ``spam``::" #: reference/import.rst:506 msgid "" @@ -1034,11 +1069,12 @@ msgid "" "foo']`` (as you would after the above import), the latter must appear as the " "``foo`` attribute of the former." msgstr "" -"Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό μπορεί να " -"φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες χαρακτηριστικό του " -"συστήματος εισαγωγής. Η αμετάβλητη συνθήκη είναι ότι, αν έχετε ``sys.modules['spam']`` " -"και ``sys.modules['spam.foo']`` (όπως θα είχατε μετά την παραπάνω εισαγωγή), το δεύτερο " -"πρέπει να εμφανίζεται ως το χαρακτηριστικό ``foo`` του πρώτου." +"Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό " +"μπορεί να φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες " +"χαρακτηριστικό του συστήματος εισαγωγής. Η αμετάβλητη συνθήκη είναι ότι, αν " +"έχετε ``sys.modules['spam']`` και ``sys.modules['spam.foo']`` (όπως θα " +"είχατε μετά την παραπάνω εισαγωγή), το δεύτερο πρέπει να εμφανίζεται ως το " +"χαρακτηριστικό ``foo`` του πρώτου." #: reference/import.rst:521 msgid "Module specs" @@ -1051,10 +1087,11 @@ msgid "" "modules. The purpose of a module's spec is to encapsulate this import-" "related information on a per-module basis." msgstr "" -"Ο μηχανισμός εισαγωγής χρησιμοποιεί ποικιλία πληροφοριών για κάθε module κατά την " -"εισαγωγή, ειδικά πριν τη φόρτωση. Οι περισσότερες από αυτές τις πληροφορίες είναι " -"κοινές για όλα τα modules. Ο σκοπός του spec ενός module είναι να ενθυλακώσει αυτή την " -"πληροφορία που σχετίζεται με την εισαγωγή, σε βάση ανά module." +"Ο μηχανισμός εισαγωγής χρησιμοποιεί ποικιλία πληροφοριών για κάθε module " +"κατά την εισαγωγή, ειδικά πριν τη φόρτωση. Οι περισσότερες από αυτές τις " +"πληροφορίες είναι κοινές για όλα τα modules. Ο σκοπός του spec ενός module " +"είναι να ενθυλακώσει αυτή την πληροφορία που σχετίζεται με την εισαγωγή, σε " +"βάση ανά module." #: reference/import.rst:528 msgid "" @@ -1064,11 +1101,11 @@ msgid "" "machinery to perform the boilerplate operations of loading, whereas without " "a module spec the loader had that responsibility." msgstr "" -"Η χρήση ενός spec κατά την εισαγωγή επιτρέπει τη μεταφορά κατάστασης μεταξύ των " -"συστατικών του συστήματος εισαγωγής, π.χ. μεταξύ του finder που δημιουργεί το module " -"spec και του loader που το εκτελεί. Το σημαντικότερο είναι ότι επιτρέπει στον μηχανισμό " -"εισαγωγής να εκτελεί τις τυποποιημένες λειτουργίες φόρτωσης, ενώ χωρίς module spec αυτή " -"η ευθύνη ανήκε στον loader." +"Η χρήση ενός spec κατά την εισαγωγή επιτρέπει τη μεταφορά κατάστασης μεταξύ " +"των συστατικών του συστήματος εισαγωγής, π.χ. μεταξύ του finder που " +"δημιουργεί το module spec και του loader που το εκτελεί. Το σημαντικότερο " +"είναι ότι επιτρέπει στον μηχανισμό εισαγωγής να εκτελεί τις τυποποιημένες " +"λειτουργίες φόρτωσης, ενώ χωρίς module spec αυτή η ευθύνη ανήκε στον loader." #: reference/import.rst:534 msgid "" @@ -1078,17 +1115,18 @@ msgid "" "attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" "Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " -"του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται κατά την " -"εκκίνηση των του διερμηνέα`. Η μόνη εξαίρεση είναι το ``__main__``, όπου " -"το :attr:`!__spec__` :ref:`τίθεται σε None σε ορισμένες περιπτώσεις `." +"του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται " +"κατά την εκκίνηση των του διερμηνέα`. Η μόνη εξαίρεση είναι το " +"``__main__``, όπου το :attr:`!__spec__` :ref:`τίθεται σε None σε ορισμένες " +"περιπτώσεις `." #: reference/import.rst:540 msgid "" "See :class:`~importlib.machinery.ModuleSpec` for details on the contents of " "the module spec." msgstr "" -"Δείτε την :class:`~importlib.machinery.ModuleSpec` για λεπτομέρειες σχετικά με τα " -"περιεχόμενα του module spec." +"Δείτε την :class:`~importlib.machinery.ModuleSpec` για λεπτομέρειες σχετικά " +"με τα περιεχόμενα του module spec." #: reference/import.rst:548 msgid "__path__ attributes on modules" @@ -1101,10 +1139,10 @@ msgid "" "submodules will be found. By definition, if a module has a :attr:`!__path__` " "attribute, it is a :term:`package`." msgstr "" -"Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια (ενδεχομένως " -"κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις τοποθεσίες όπου θα βρεθούν " -"τα submodules του πακέτου. Εξ ορισμού, αν ένα module έχει χαρακτηριστικό :attr:`!" -"__path__`, τότε είναι :term:`package`." +"Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια " +"(ενδεχομένως κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις " +"τοποθεσίες όπου θα βρεθούν τα submodules του πακέτου. Εξ ορισμού, αν ένα " +"module έχει χαρακτηριστικό :attr:`!__path__`, τότε είναι :term:`package`." #: reference/import.rst:555 msgid "" @@ -1114,11 +1152,11 @@ msgid "" "during import. However, :attr:`!__path__` is typically much more constrained " "than :data:`!sys.path`." msgstr "" -"Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά την " -"εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί παρόμοια με " -"το :data:`sys.path`, δηλαδή παρέχει μια λίστα τοποθεσιών στις οποίες αναζητούνται " -"modules κατά την εισαγωγή. Ωστόσο, το :attr:`!__path__` είναι συνήθως πολύ πιο " -"περιορισμένο από το :data:`!sys.path`." +"Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά " +"την εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί " +"παρόμοια με το :data:`sys.path`, δηλαδή παρέχει μια λίστα τοποθεσιών στις " +"οποίες αναζητούνται modules κατά την εισαγωγή. Ωστόσο, το :attr:`!__path__` " +"είναι συνήθως πολύ πιο περιορισμένο από το :data:`!sys.path`." #: reference/import.rst:562 msgid "" @@ -1126,9 +1164,10 @@ msgid "" "__path__`. :data:`sys.path_hooks` (described below) are consulted when " "traversing a package's :attr:`!__path__`." msgstr "" -"Οι ίδιοι κανόνες που ισχύουν για το :data:`sys.path` ισχύουν επίσης και για το :attr:`!" -"__path__` ενός πακέτου. Τα :data:`sys.path_hooks` (που περιγράφονται παρακάτω) " -"λαμβάνονται υπόψη κατά τη διάσχιση του :attr:`!__path__` ενός πακέτου." +"Οι ίδιοι κανόνες που ισχύουν για το :data:`sys.path` ισχύουν επίσης και για " +"το :attr:`!__path__` ενός πακέτου. Τα :data:`sys.path_hooks` (που " +"περιγράφονται παρακάτω) λαμβάνονται υπόψη κατά τη διάσχιση του :attr:`!" +"__path__` ενός πακέτου." #: reference/import.rst:566 msgid "" @@ -1140,11 +1179,12 @@ msgid "" "automatically sets :attr:`!__path__` correctly for the namespace package." msgstr "" "Το αρχείο ``__init__.py`` ενός πακέτου μπορεί να ορίζει ή να τροποποιεί το " -"χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως ο τρόπος με " -"τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. Με την υιοθέτηση " -"του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να παρέχουν αρχεία " -"``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :attr:`!__path__`· ο μηχανισμός " -"εισαγωγής ορίζει αυτόματα σωστά το :attr:`!__path__` για το namespace πακέτο." +"χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως " +"ο τρόπος με τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. " +"Με την υιοθέτηση του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να " +"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :" +"attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά το :attr:`!" +"__path__` για το namespace πακέτο." #: reference/import.rst:575 msgid "Module reprs" @@ -1156,9 +1196,9 @@ msgid "" "attributes set above, and in the module's spec, you can more explicitly " "control the repr of module objects." msgstr "" -"Από προεπιλογή, όλα τα modules έχουν ένα χρησιμοποιήσιμο repr· ωστόσο, ανάλογα με τα " -"χαρακτηριστικά που ορίζονται παραπάνω και στο spec του module, μπορείτε να ελέγχετε πιο " -"ρητά το repr των αντικειμένων module." +"Από προεπιλογή, όλα τα modules έχουν ένα χρησιμοποιήσιμο repr· ωστόσο, " +"ανάλογα με τα χαρακτηριστικά που ορίζονται παραπάνω και στο spec του module, " +"μπορείτε να ελέγχετε πιο ρητά το repr των αντικειμένων module." #: reference/import.rst:581 msgid "" @@ -1169,12 +1209,12 @@ msgid "" "__file__``, and ``module.__loader__`` as input into the repr, with defaults " "for whatever information is missing." msgstr "" -"Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει να παράγει " -"repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα εισαγωγής θα " -"δημιουργήσει ένα προεπιλεγμένο repr χρησιμοποιώντας όποια πληροφορία είναι διαθέσιμη " -"στο module. Θα προσπαθήσει να χρησιμοποιήσει τα ``module.__name__``, " -"``module.__file__`` και ``module.__loader__`` ως είσοδο για το repr, με προεπιλογές για " -"οποιαδήποτε πληροφορία λείπει." +"Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει " +"να παράγει repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα " +"εισαγωγής θα δημιουργήσει ένα προεπιλεγμένο repr χρησιμοποιώντας όποια " +"πληροφορία είναι διαθέσιμη στο module. Θα προσπαθήσει να χρησιμοποιήσει τα " +"``module.__name__``, ``module.__file__`` και ``module.__loader__`` ως είσοδο " +"για το repr, με προεπιλογές για οποιαδήποτε πληροφορία λείπει." #: reference/import.rst:588 msgid "Here are the exact rules used:" @@ -1186,29 +1226,31 @@ msgid "" "used to generate the repr. The \"name\", \"loader\", \"origin\", and " "\"has_location\" attributes are consulted." msgstr "" -"Αν το module έχει χαρακτηριστικό ``__spec__``, οι πληροφορίες στο spec χρησιμοποιούνται " -"για να παραχθεί το repr. Λαμβάνονται υπόψη τα χαρακτηριστικά \"name\", \"loader\", " -"\"origin\" και \"has_location\"." +"Αν το module έχει χαρακτηριστικό ``__spec__``, οι πληροφορίες στο spec " +"χρησιμοποιούνται για να παραχθεί το repr. Λαμβάνονται υπόψη τα " +"χαρακτηριστικά \"name\", \"loader\", \"origin\" και \"has_location\"." #: reference/import.rst:594 msgid "" "If the module has a ``__file__`` attribute, this is used as part of the " "module's repr." msgstr "" -"Αν το module έχει χαρακτηριστικό ``__file__``, αυτό χρησιμοποιείται ως μέρος του repr " -"του module." +"Αν το module έχει χαρακτηριστικό ``__file__``, αυτό χρησιμοποιείται ως μέρος " +"του repr του module." #: reference/import.rst:597 msgid "" "If the module has no ``__file__`` but does have a ``__loader__`` that is not " "``None``, then the loader's repr is used as part of the module's repr." msgstr "" -"Αν το module δεν έχει ``__file__`` αλλά έχει ``__loader__`` που δεν είναι ``None``, " -"τότε το repr του loader χρησιμοποιείται ως μέρος του repr του module." +"Αν το module δεν έχει ``__file__`` αλλά έχει ``__loader__`` που δεν είναι " +"``None``, τότε το repr του loader χρησιμοποιείται ως μέρος του repr του " +"module." #: reference/import.rst:600 msgid "Otherwise, just use the module's ``__name__`` in the repr." -msgstr "Διαφορετικά, χρησιμοποιείται απλώς το ``__name__`` του module στο repr." +msgstr "" +"Διαφορετικά, χρησιμοποιείται απλώς το ``__name__`` του module στο repr." #: reference/import.rst:602 msgid "" @@ -1216,9 +1258,9 @@ msgid "" "removed in Python 3.12 and is no longer called during the resolution of a " "module's repr." msgstr "" -"Η χρήση της :meth:`!module_repr`, η οποία ήταν δηλωμένη ως απαρχαιωμένη από την Python " -"3.4, αφαιρέθηκε στην Python 3.12 και δεν καλείται πλέον κατά την/επίλυση του repr ενός " -"module." +"Η χρήση της :meth:`!module_repr`, η οποία ήταν δηλωμένη ως απαρχαιωμένη από " +"την Python 3.4, αφαιρέθηκε στην Python 3.12 και δεν καλείται πλέον κατά την/" +"επίλυση του repr ενός module." #: reference/import.rst:610 msgid "Cached bytecode invalidation" @@ -1233,13 +1275,14 @@ msgid "" "cache file by checking the stored metadata in the cache file against the " "source's metadata." msgstr "" -"Πριν η Python φορτώσει cached bytecode από ένα αρχείο ``.pyc``, ελέγχει αν η προσωρινή " -"μνήμη είναι ενημερωμένη σε σχέση με το πηγαίο αρχείο ``.py``. Από προεπιλογή, η Python " -"το κάνει αυτό αποθηκεύοντας τη χρονική σήμανση της τελευταίας τροποποίησης και το " -"μέγεθος του πηγαίου αρχείου στο αρχείο προσωρινής μνήμης κατά την εγγραφή του. Κατά το " -"χρόνο εκτέλεσης, το σύστημα εισαγωγής επικυρώνει το αρχείο προσωρινής μνήμης ελέγχοντας " -"τα αποθηκευμένα μεταδεδομένα του αρχείου προσωρινής μνήμης σε σχέση με τα μεταδεδομένα " -"του πηγαίου αρχείου." +"Πριν η Python φορτώσει cached bytecode από ένα αρχείο ``.pyc``, ελέγχει αν η " +"προσωρινή μνήμη είναι ενημερωμένη σε σχέση με το πηγαίο αρχείο ``.py``. Από " +"προεπιλογή, η Python το κάνει αυτό αποθηκεύοντας τη χρονική σήμανση της " +"τελευταίας τροποποίησης και το μέγεθος του πηγαίου αρχείου στο αρχείο " +"προσωρινής μνήμης κατά την εγγραφή του. Κατά το χρόνο εκτέλεσης, το σύστημα " +"εισαγωγής επικυρώνει το αρχείο προσωρινής μνήμης ελέγχοντας τα αποθηκευμένα " +"μεταδεδομένα του αρχείου προσωρινής μνήμης σε σχέση με τα μεταδεδομένα του " +"πηγαίου αρχείου." #: reference/import.rst:619 msgid "" @@ -1254,25 +1297,27 @@ msgid "" "Hash-based ``.pyc`` files validation behavior may be overridden with the :" "option:`--check-hash-based-pycs` flag." msgstr "" -"Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα οποία " -"αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα μεταδεδομένα του. " -"Υπάρχουν δύο παραλλαγές των ``.pyc`` αρχείων βασισμένων σε hash: checked και unchecked. " -"Για τα checked ``.pyc`` αρχεία που βασίζονται σε hash, η Python επικυρώνει το αρχείο " -"προσωρινής μνήμης δημιουργώντας hash του πηγαίου αρχείου και συγκρίνοντας το αποτέλεσμα " -"με το hash στο αρχείο προσωρινής μνήμης. Αν ένα checked αρχείο προσωρινής μνήμης " -"βασισμένο σε hash βρεθεί μη έγκυρο, η Python το αναδημιουργεί και γράφει ένα νέο " -"checked αρχείο προσωρινής μνήμης βασισμένο σε hash. Για τα unchecked ``.pyc`` αρχεία " -"βασισμένα σε hash, η Python απλώς θεωρεί ότι το αρχείο προσωρινής μνήμης είναι έγκυρο " -"αν υπάρχει. Η συμπεριφορά επικύρωσης των ``.pyc`` αρχείων βασισμένων σε hash μπορεί να " -"υπερκαλυφθεί με τη σημαία :option:`--check-hash-based-pycs`." +"Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα " +"οποία αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα " +"μεταδεδομένα του. Υπάρχουν δύο παραλλαγές των ``.pyc`` αρχείων βασισμένων σε " +"hash: checked και unchecked. Για τα checked ``.pyc`` αρχεία που βασίζονται " +"σε hash, η Python επικυρώνει το αρχείο προσωρινής μνήμης δημιουργώντας hash " +"του πηγαίου αρχείου και συγκρίνοντας το αποτέλεσμα με το hash στο αρχείο " +"προσωρινής μνήμης. Αν ένα checked αρχείο προσωρινής μνήμης βασισμένο σε hash " +"βρεθεί μη έγκυρο, η Python το αναδημιουργεί και γράφει ένα νέο checked " +"αρχείο προσωρινής μνήμης βασισμένο σε hash. Για τα unchecked ``.pyc`` αρχεία " +"βασισμένα σε hash, η Python απλώς θεωρεί ότι το αρχείο προσωρινής μνήμης " +"είναι έγκυρο αν υπάρχει. Η συμπεριφορά επικύρωσης των ``.pyc`` αρχείων " +"βασισμένων σε hash μπορεί να υπερκαλυφθεί με τη σημαία :option:`--check-hash-" +"based-pycs`." #: reference/import.rst:630 msgid "" "Added hash-based ``.pyc`` files. Previously, Python only supported timestamp-" "based invalidation of bytecode caches." msgstr "" -"Προστέθηκαν``.pyc`` αρχεία βασισμένα σε hash . Προηγουμένως, η Python υποστήριζε μόνο " -"ακύρωση των bytecode caches με βάση χρονικές σημάνσεις." +"Προστέθηκαν``.pyc`` αρχεία βασισμένα σε hash . Προηγουμένως, η Python " +"υποστήριζε μόνο ακύρωση των bytecode caches με βάση χρονικές σημάνσεις." #: reference/import.rst:636 msgid "The Path Based Finder" @@ -1286,11 +1331,12 @@ msgid "" "contains a list of :term:`path entries `. Each path entry names " "a location to search for modules." msgstr "" -"Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς προεπιλεγμένους meta " -"path finders. Ένας από αυτούς, που ονομάζεται :term:`path based finder` " -"(:class:`~importlib.machinery.PathFinder`), αναζητά σε ένα :term:`import path`, το " -"οποίο περιέχει μια λίστα από :term:`path entries `. Κάθε path entry " -"ονομάζει μια τοποθεσία όπου θα αναζητηθούν modules." +"Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς " +"προεπιλεγμένους meta path finders. Ένας από αυτούς, που ονομάζεται :term:" +"`path based finder` (:class:`~importlib.machinery.PathFinder`), αναζητά σε " +"ένα :term:`import path`, το οποίο περιέχει μια λίστα από :term:`path entries " +"`. Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν " +"modules." #: reference/import.rst:647 msgid "" @@ -1298,10 +1344,10 @@ msgid "" "it traverses the individual path entries, associating each of them with a " "path entry finder that knows how to handle that particular kind of path." msgstr "" -"Ο ίδιος ο path based finder δεν «γνωρίζει» πώς να εισάγει οτιδήποτε. Αντ’ αυτού, " -"διασχίζει τις επιμέρους καταχωρήσεις διαδρομής, συσχετίζοντας το καθένα με έναν finder " -"καταχώρησης διαδρομής που γνωρίζει πώς να χειριστεί αυτόν τον συγκεκριμένο τύπο " -"διαδρομής." +"Ο ίδιος ο path based finder δεν «γνωρίζει» πώς να εισάγει οτιδήποτε. Αντ’ " +"αυτού, διασχίζει τις επιμέρους καταχωρήσεις διαδρομής, συσχετίζοντας το " +"καθένα με έναν finder καταχώρησης διαδρομής που γνωρίζει πώς να χειριστεί " +"αυτόν τον συγκεκριμένο τύπο διαδρομής." #: reference/import.rst:651 msgid "" @@ -1313,13 +1359,14 @@ msgid "" "also handle loading all of these file types (other than shared libraries) " "from zipfiles." msgstr "" -"Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη σημασιολογία για " -"την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο ειδικούς τύπους αρχείων όπως " -"πηγαίο κώδικα Python (αρχεία ``.py``), byte code Python (αρχεία ``.pyc``) και " -"κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``.so``). Όταν υποστηρίζεται από το " -"module :mod:`zipimport` της τυπικής βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης " -"διαδρομής χειρίζονται επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από " -"κοινόχρηστες βιβλιοθήκες) από zipfiles." +"Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη " +"σημασιολογία για την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο " +"ειδικούς τύπους αρχείων όπως πηγαίο κώδικα Python (αρχεία ``.py``), byte " +"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``." +"so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " +"βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης διαδρομής χειρίζονται " +"επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από κοινόχρηστες " +"βιβλιοθήκες) από zipfiles." #: reference/import.rst:658 msgid "" @@ -1327,9 +1374,10 @@ msgid "" "to URLs, database queries, or any other location that can be specified as a " "string." msgstr "" -"Οι καταχωρήσεις διαδρομής δεν χρειάζεται να περιορίζονται σε τοποθεσίες του συστήματος " -"αρχείων. Μπορούν να αναφέρονται σε URLs, σε ερωτήματα βάσεων δεδομένων ή σε οποιαδήποτε " -"άλλη τοποθεσία που μπορεί να εκφραστεί ως συμβολοσειρά." +"Οι καταχωρήσεις διαδρομής δεν χρειάζεται να περιορίζονται σε τοποθεσίες του " +"συστήματος αρχείων. Μπορούν να αναφέρονται σε URLs, σε ερωτήματα βάσεων " +"δεδομένων ή σε οποιαδήποτε άλλη τοποθεσία που μπορεί να εκφραστεί ως " +"συμβολοσειρά." #: reference/import.rst:662 msgid "" @@ -1341,14 +1389,14 @@ msgid "" "protocol described below, which was then used to get a loader for the module " "from the web." msgstr "" -"Ο path based finder παρέχει επιπλέον hooks και πρωτόκολλα ώστε να μπορείτε να " -"επεκτείνετε και να προσαρμόσετε τους τύπους των καταχωρήσεων διαδρομής που μπορούν να " -"αναζητηθούν. Για παράδειγμα, αν θέλατε να υποστηρίξετε καταχωρήσεις διαδρομής ως " -"network URLs, θα μπορούσατε να γράψετε ένα hook που υλοποιεί HTTP σημασιολογία για να " -"βρίσκει modules στο διαδίκτυο. Αυτό το hook (ένα callable) θα επέστρεφε " -"έναν :term:`path entry finder` που υποστηρίζει το πρωτόκολλο που περιγράφεται παρακάτω, " -"και στη συνέχεια θα χρησιμοποιούνταν για να ληφθεί ένας loader για το module από το " -"διαδίκτυο." +"Ο path based finder παρέχει επιπλέον hooks και πρωτόκολλα ώστε να μπορείτε " +"να επεκτείνετε και να προσαρμόσετε τους τύπους των καταχωρήσεων διαδρομής " +"που μπορούν να αναζητηθούν. Για παράδειγμα, αν θέλατε να υποστηρίξετε " +"καταχωρήσεις διαδρομής ως network URLs, θα μπορούσατε να γράψετε ένα hook " +"που υλοποιεί HTTP σημασιολογία για να βρίσκει modules στο διαδίκτυο. Αυτό το " +"hook (ένα callable) θα επέστρεφε έναν :term:`path entry finder` που " +"υποστηρίζει το πρωτόκολλο που περιγράφεται παρακάτω, και στη συνέχεια θα " +"χρησιμοποιούνταν για να ληφθεί ένας loader για το module από το διαδίκτυο." #: reference/import.rst:670 msgid "" @@ -1360,13 +1408,14 @@ msgid "" "In particular, meta path finders operate at the beginning of the import " "process, as keyed off the :data:`sys.meta_path` traversal." msgstr "" -"Μια προειδοποίηση: αυτή η ενότητα και η προηγούμενη χρησιμοποιούν και οι δύο τον όρο " -"*finder*, διακρίνοντάς τους με τους όρους :term:`meta path finder` και :term:`path " -"entry finder`. Αυτοί οι δύο τύποι finders είναι πολύ παρόμοιοι, υποστηρίζουν παρόμοια " -"πρωτόκολλα και λειτουργούν με παρόμοιο τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι " -"σημαντικό να θυμάστε ότι έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders " -"λειτουργούν στην αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση " -"του :data:`sys.meta_path`." +"Μια προειδοποίηση: αυτή η ενότητα και η προηγούμενη χρησιμοποιούν και οι δύο " +"τον όρο *finder*, διακρίνοντάς τους με τους όρους :term:`meta path finder` " +"και :term:`path entry finder`. Αυτοί οι δύο τύποι finders είναι πολύ " +"παρόμοιοι, υποστηρίζουν παρόμοια πρωτόκολλα και λειτουργούν με παρόμοιο " +"τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι σημαντικό να θυμάστε ότι " +"έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders λειτουργούν στην " +"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση του :data:" +"`sys.meta_path`." #: reference/import.rst:678 msgid "" @@ -1375,10 +1424,10 @@ msgid "" "removed from :data:`sys.meta_path`, none of the path entry finder semantics " "would be invoked." msgstr "" -"Αντίθετα, οι path entry finders είναι κατά κάποιον τρόπο μια λεπτομέρεια υλοποίησης του " -"path based finder και, στην πραγματικότητα, αν ο path based finder αφαιρούνταν από " -"το :data:`sys.meta_path`, δεν θα ενεργοποιούνταν καθόλου η σημασιολογία των finders " -"καταχώρησης διαδρομής." +"Αντίθετα, οι path entry finders είναι κατά κάποιον τρόπο μια λεπτομέρεια " +"υλοποίησης του path based finder και, στην πραγματικότητα, αν ο path based " +"finder αφαιρούνταν από το :data:`sys.meta_path`, δεν θα ενεργοποιούνταν " +"καθόλου η σημασιολογία των finders καταχώρησης διαδρομής." #: reference/import.rst:685 msgid "Path entry finders" @@ -1391,10 +1440,11 @@ msgid "" "entry`. Most path entries name locations in the file system, but they need " "not be limited to this." msgstr "" -"Ο :term:`path based finder` είναι υπεύθυνος για την εύρεση και φόρτωση Python modules " -"και πακέτων των οποίων η τοποθεσία καθορίζεται με μία συμβολοσειρά :term:`path entry`. " -"Οι περισσότερες καταχωρήσεις διαδρομής (path entries) δηλώνουν τοποθεσίες στο σύστημα " -"αρχείων, αλλά δεν περιορίζονται απαραίτητα σε αυτό." +"Ο :term:`path based finder` είναι υπεύθυνος για την εύρεση και φόρτωση " +"Python modules και πακέτων των οποίων η τοποθεσία καθορίζεται με μία " +"συμβολοσειρά :term:`path entry`. Οι περισσότερες καταχωρήσεις διαδρομής " +"(path entries) δηλώνουν τοποθεσίες στο σύστημα αρχείων, αλλά δεν " +"περιορίζονται απαραίτητα σε αυτό." #: reference/import.rst:698 msgid "" @@ -1403,10 +1453,11 @@ msgid "" "however it exposes additional hooks that can be used to customize how " "modules are found and loaded from the :term:`import path`." msgstr "" -"Ως meta path finder, ο :term:`path based finder` υλοποιεί το " -"πρωτόκολλο :meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε " -"προηγουμένως, ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " -"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import path`." +"Ως meta path finder, ο :term:`path based finder` υλοποιεί το πρωτόκολλο :" +"meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε προηγουμένως, " +"ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " +"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import " +"path`." #: reference/import.rst:703 msgid "" @@ -1415,10 +1466,11 @@ msgid "" "``__path__`` attributes on package objects are also used. These provide " "additional ways that the import machinery can be customized." msgstr "" -"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based " -"finder`: :data:`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " -"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα πακέτου. Αυτά " -"παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού εισαγωγής." +"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based finder`: :data:" +"`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " +"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα " +"πακέτου. Αυτά παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού " +"εισαγωγής." #: reference/import.rst:708 msgid "" @@ -1431,13 +1483,14 @@ msgid "" "database queries. Only strings should be present on :data:`sys.path`; all " "other data types are ignored." msgstr "" -"Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν τοποθεσίες " -"αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη μεταβλητή " -"περιβάλλοντος :envvar:`PYTHONPATH` και από διάφορες άλλες προεπιλογές που εξαρτώνται " -"από την εγκατάσταση και την υλοποίηση. Οι εγγραφές στο :data:`sys.path` μπορεί να είναι " -"φάκελοι στο σύστημα αρχείων, zip αρχεία και ενδεχομένως άλλες «τοποθεσίες» (βλ. το " -"module :mod:`site`) στις οποίες πρέπει να γίνει αναζήτηση για modules, όπως URLs ή " -"ερωτήματα βάσεων δεδομένων. Στο :data:`sys.path` θα πρέπει να υπάρχουν μόνο " +"Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν " +"τοποθεσίες αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη " +"μεταβλητή περιβάλλοντος :envvar:`PYTHONPATH` και από διάφορες άλλες " +"προεπιλογές που εξαρτώνται από την εγκατάσταση και την υλοποίηση. Οι " +"εγγραφές στο :data:`sys.path` μπορεί να είναι φάκελοι στο σύστημα αρχείων, " +"zip αρχεία και ενδεχομένως άλλες «τοποθεσίες» (βλ. το module :mod:`site`) " +"στις οποίες πρέπει να γίνει αναζήτηση για modules, όπως URLs ή ερωτήματα " +"βάσεων δεδομένων. Στο :data:`sys.path` θα πρέπει να υπάρχουν μόνο " "συμβολοσειρές· όλοι οι άλλοι τύποι δεδομένων αγνοούνται." #: reference/import.rst:717 @@ -1451,14 +1504,15 @@ msgid "" "within that package. If the ``path`` argument is ``None``, this indicates a " "top level import and :data:`sys.path` is used." msgstr "" -"Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο μηχανισμός " -"εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας τη " -"μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based finder, όπως " -"περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` " -"στη :meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα από " -"συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό ``__path__`` ενός " -"πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το όρισμα ``path`` είναι ``None``, " -"αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου και χρησιμοποιείται το :data:`sys.path`." +"Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο " +"μηχανισμός εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας " +"τη μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based " +"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` στη :" +"meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα " +"από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " +"``__path__`` ενός πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το " +"όρισμα ``path`` είναι ``None``, αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου " +"και χρησιμοποιείται το :data:`sys.path`." #: reference/import.rst:726 msgid "" @@ -1475,18 +1529,20 @@ msgid "" "cache entries from :data:`sys.path_importer_cache` forcing the path based " "finder to perform the path entry search again." msgstr "" -"Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή αναζήτησης και, " -"για καθεμία, αναζητά έναν κατάλληλο :term:`path entry finder` " -"(:class:`~importlib.abc.PathEntryFinder`) για τη συγκεκριμένη καταχώρηση διαδρομής. " -"Επειδή αυτό μπορεί να είναι δαπανηρή λειτουργία (π.χ. μπορεί να υπάρχει overhead από " -"κλήσεις ``stat()`` για αυτή την αναζήτηση), ο path based finder διατηρεί μια προσωρινή " -"μνήμη που αντιστοιχίζει καταχωρήσεις διαδρομής σε path entry finders. Αυτή η προσωρινή " -"μνήμη διατηρείται στο :data:`sys.path_importer_cache` (παρά το όνομα, αυτή η προσωρινή " -"μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` αντικείμενα). Με " -"αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path entry` finder μιας " -"συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία φορά. Ο κώδικας του χρήστη μπορεί " -"να αφαιρεί εγγραφές από το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based " -"finder να εκτελέσει ξανά την αναζήτηση." +"Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή " +"αναζήτησης και, για καθεμία, αναζητά έναν κατάλληλο :term:`path entry " +"finder` (:class:`~importlib.abc.PathEntryFinder`) για τη συγκεκριμένη " +"καταχώρηση διαδρομής. Επειδή αυτό μπορεί να είναι δαπανηρή λειτουργία (π.χ. " +"μπορεί να υπάρχει overhead από κλήσεις ``stat()`` για αυτή την αναζήτηση), ο " +"path based finder διατηρεί μια προσωρινή μνήμη που αντιστοιχίζει " +"καταχωρήσεις διαδρομής σε path entry finders. Αυτή η προσωρινή μνήμη " +"διατηρείται στο :data:`sys.path_importer_cache` (παρά το όνομα, αυτή η " +"προσωρινή μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` " +"αντικείμενα). Με αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path " +"entry` finder μιας συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία " +"φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από το :data:`sys." +"path_importer_cache`, αναγκάζοντας τον path based finder να εκτελέσει ξανά " +"την αναζήτηση." #: reference/import.rst:739 msgid "" @@ -1503,19 +1559,20 @@ msgid "" "file system encoding, UTF-8, or something else), and if the hook cannot " "decode the argument, it should raise :exc:`ImportError`." msgstr "" -"Αν η καταχώρηση διαδρομής δεν υπάρχει στην προσωρινή μνήμη, ο path based finder " -"επαναλαμβάνεται πάνω σε κάθε callable στο :data:`sys.path_hooks`. Κάθε :term:`path " -"entry hook ` σε αυτή τη λίστα καλείται με ένα μόνο όρισμα: την " -"καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το callable μπορεί είτε να επιστρέψει " -"έναν :term:`path entry finder` που μπορεί να χειριστεί την καταχώρηση διαδρομής, είτε " -"να κάνει raise ένα :exc:`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον " -"path based finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " -"finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η επανάληψη " -"στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει είτε συμβολοσειρά " -"είτε αντικείμενο bytes· η κωδικοποίηση των bytes αντικειμένων επαφίεται στο hook (π.χ. " -"μπορεί να είναι μία κωδικοποίηση του συστήματος αρχείων, UTF-8 ή κάτι άλλο), και αν το " -"hook δεν μπορεί να κάνει αποκωδικοποίηση το όρισμα, θα πρέπει να κάνει raise " -"ένα :exc:`ImportError`." +"Αν η καταχώρηση διαδρομής δεν υπάρχει στην προσωρινή μνήμη, ο path based " +"finder επαναλαμβάνεται πάνω σε κάθε callable στο :data:`sys.path_hooks`. " +"Κάθε :term:`path entry hook ` σε αυτή τη λίστα καλείται με " +"ένα μόνο όρισμα: την καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το " +"callable μπορεί είτε να επιστρέψει έναν :term:`path entry finder` που μπορεί " +"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise ένα :exc:" +"`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path based " +"finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " +"finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η " +"επανάληψη στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει " +"είτε συμβολοσειρά είτε αντικείμενο bytes· η κωδικοποίηση των bytes " +"αντικειμένων επαφίεται στο hook (π.χ. μπορεί να είναι μία κωδικοποίηση του " +"συστήματος αρχείων, UTF-8 ή κάτι άλλο), και αν το hook δεν μπορεί να κάνει " +"αποκωδικοποίηση το όρισμα, θα πρέπει να κάνει raise ένα :exc:`ImportError`." #: reference/import.rst:753 msgid "" @@ -1526,11 +1583,12 @@ msgid "" "entry) and return ``None``, indicating that this :term:`meta path finder` " "could not find the module." msgstr "" -"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :term:`path " -"entry finder`, τότε η μέθοδος :meth:`~importlib.machinery.PathFinder.find_spec` του " -"path based finder θα αποθηκεύσει ``None`` στο :data:`sys.path_importer_cache` (για να " -"δηλώσει ότι δεν υπάρχει finder για αυτη την καταχώρηση διαδρομής) και θα επιστρέψει " -"``None``, δηλώνοντας ότι αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." +"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :" +"term:`path entry finder`, τότε η μέθοδος :meth:`~importlib.machinery." +"PathFinder.find_spec` του path based finder θα αποθηκεύσει ``None`` στο :" +"data:`sys.path_importer_cache` (για να δηλώσει ότι δεν υπάρχει finder για " +"αυτη την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " +"αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." #: reference/import.rst:760 msgid "" @@ -1539,10 +1597,10 @@ msgid "" "used to ask the finder for a module spec, which is then used when loading " "the module." msgstr "" -"Αν *επιστραφεί* ένας :term:`path entry finder` από κάποιο από τα :term:`path entry " -"hook` callables στο :data:`sys.path_hooks`, τότε χρησιμοποιείται το ακόλουθο πρωτόκολλο " -"για να ζητηθεί από τον finder ένα module spec, το οποίο στη συνέχεια χρησιμοποιείται " -"κατά τη φόρτωση του module." +"Αν *επιστραφεί* ένας :term:`path entry finder` από κάποιο από τα :term:`path " +"entry hook` callables στο :data:`sys.path_hooks`, τότε χρησιμοποιείται το " +"ακόλουθο πρωτόκολλο για να ζητηθεί από τον finder ένα module spec, το οποίο " +"στη συνέχεια χρησιμοποιείται κατά τη φόρτωση του module." #: reference/import.rst:765 msgid "" @@ -1555,14 +1613,15 @@ msgid "" "meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " "working directory and not the empty string." msgstr "" -"Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- αντιμετωπίζεται " -"λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys.path`. Πρώτον, αν δεν μπορεί να " -"προσδιοριστεί ή αν διαπιστωθεί ότι δεν υπάρχει, δεν αποθηκεύεται τιμή " -"στο :data:`sys.path_importer_cache`. Δεύτερον, η τιμή για τον τρέχοντα κατάλογο " -"εργασίας αναζητείται εκ νέου για κάθε αναζήτηση module. Τρίτον, η διαδρομή που " -"χρησιμοποιείται για το :data:`sys.path_importer_cache` και επιστρέφεται από " -"τη :meth:`importlib.machinery.PathFinder.find_spec` θα είναι ο πραγματικός τρέχων " -"κατάλογος εργασίας και όχι η κενή συμβολοσειρά." +"Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- " +"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys." +"path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν διαπιστωθεί ότι δεν " +"υπάρχει, δεν αποθηκεύεται τιμή στο :data:`sys.path_importer_cache`. " +"Δεύτερον, η τιμή για τον τρέχοντα κατάλογο εργασίας αναζητείται εκ νέου για " +"κάθε αναζήτηση module. Τρίτον, η διαδρομή που χρησιμοποιείται για το :data:" +"`sys.path_importer_cache` και επιστρέφεται από τη :meth:`importlib.machinery." +"PathFinder.find_spec` θα είναι ο πραγματικός τρέχων κατάλογος εργασίας και " +"όχι η κενή συμβολοσειρά." #: reference/import.rst:775 msgid "Path entry finder protocol" @@ -1574,9 +1633,10 @@ msgid "" "contribute portions to namespace packages, path entry finders must implement " "the :meth:`~importlib.abc.PathEntryFinder.find_spec` method." msgstr "" -"Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, καθώς και " -"για τη συνεισφορά portions σε namespace πακέτα, οι path entry finders πρέπει να " -"υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder.find_spec`." +"Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, " +"καθώς και για τη συνεισφορά portions σε namespace πακέτα, οι path entry " +"finders πρέπει να υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder." +"find_spec`." #: reference/import.rst:781 msgid "" @@ -1585,10 +1645,11 @@ msgid "" "module. ``find_spec()`` returns a fully populated spec for the module. This " "spec will always have \"loader\" set (with one exception)." msgstr "" -"Η :meth:`~importlib.abc.PathEntryFinder.find_spec` παίρνει δύο ορίσματα: το πλήρως " -"αναγνωρισμένο όνομα του module που εισάγεται και το (προαιρετικό) target module. Η " -"``find_spec()`` επιστρέφει ένα πλήρως συμπληρωμένο spec για το module. Αυτό το spec θα " -"έχει πάντα ορισμένο το \"loader\" (με μία εξαίρεση)." +"Η :meth:`~importlib.abc.PathEntryFinder.find_spec` παίρνει δύο ορίσματα: το " +"πλήρως αναγνωρισμένο όνομα του module που εισάγεται και το (προαιρετικό) " +"target module. Η ``find_spec()`` επιστρέφει ένα πλήρως συμπληρωμένο spec για " +"το module. Αυτό το spec θα έχει πάντα ορισμένο το \"loader\" (με μία " +"εξαίρεση)." #: reference/import.rst:786 msgid "" @@ -1597,8 +1658,8 @@ msgid "" "a list containing the portion." msgstr "" "Για να δηλώσει στον μηχανισμό εισαγωγής ότι το spec αναπαριστά ένα " -"namespace :term:`portion`, ο path entry finder ορίζει το ``submodule_search_locations`` " -"σε μια λίστα που περιέχει το portion." +"namespace :term:`portion`, ο path entry finder ορίζει το " +"``submodule_search_locations`` σε μια λίστα που περιέχει το portion." #: reference/import.rst:790 msgid "" @@ -1607,8 +1668,8 @@ msgid "" "will be used if ``find_spec()`` is not defined." msgstr "" "Η :meth:`~importlib.abc.PathEntryFinder.find_spec` αντικατέστησε τις :meth:`!" -"find_loader` και :meth:`!find_module`, οι οποίες έχουν πλέον χαρακτηριστεί ως " -"απαρχαιωμένες, αλλά θα χρησιμοποιηθούν αν δεν ορίζεται η ``find_spec()``." +"find_loader` και :meth:`!find_module`, οι οποίες έχουν πλέον χαρακτηριστεί " +"ως απαρχαιωμένες, αλλά θα χρησιμοποιηθούν αν δεν ορίζεται η ``find_spec()``." #: reference/import.rst:796 msgid "" @@ -1617,10 +1678,11 @@ msgid "" "backward compatibility. However, if ``find_spec()`` is implemented on the " "path entry finder, the legacy methods are ignored." msgstr "" -"Παλαιότεροι path entry finders μπορεί να υλοποιούν μία από αυτές τις δύο απαρχαιωμένες " -"μεθόδους αντί για την ``find_spec()``. Οι μέθοδοι αυτές εξακολουθούν να γίνονται δεκτές " -"για λόγους συμβατότητας προς τα πίσω. Ωστόσο, αν ο path entry finder υλοποιεί " -"``find_spec()``, οι παλιές μέθοδοι αγνοούνται." +"Παλαιότεροι path entry finders μπορεί να υλοποιούν μία από αυτές τις δύο " +"απαρχαιωμένες μεθόδους αντί για την ``find_spec()``. Οι μέθοδοι αυτές " +"εξακολουθούν να γίνονται δεκτές για λόγους συμβατότητας προς τα πίσω. " +"Ωστόσο, αν ο path entry finder υλοποιεί ``find_spec()``, οι παλιές μέθοδοι " +"αγνοούνται." #: reference/import.rst:801 msgid "" @@ -1628,9 +1690,10 @@ msgid "" "module being imported. ``find_loader()`` returns a 2-tuple where the first " "item is the loader and the second item is a namespace :term:`portion`." msgstr "" -"Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του module που " -"εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο στοιχείο είναι ο " -"loader και το δεύτερο στοιχείο είναι ένα namespace :term:`portion`." +"Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του " +"module που εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο " +"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα namespace :term:" +"`portion`." #: reference/import.rst:806 msgid "" @@ -1641,11 +1704,12 @@ msgid "" "(they are expected to record the appropriate path information from the " "initial call to the path hook)." msgstr "" -"Για συμβατότητα προς τα πίσω με άλλες υλοποιήσεις του πρωτοκόλλου εισαγωγής, πολλοί " -"path entry finders υποστηρίζουν επίσης την ίδια παραδοσιακή μέθοδο ``find_module()`` " -"που υποστηρίζουν και οι meta path finders. Ωστόσο, οι μέθοδοι ``find_module()`` των " -"path entry finders δεν καλούνται ποτέ με όρισμα ``path`` (αναμένεται να έχουν " -"καταγράψει την κατάλληλη πληροφορία διαδρομής από την αρχική κλήση του path hook)." +"Για συμβατότητα προς τα πίσω με άλλες υλοποιήσεις του πρωτοκόλλου εισαγωγής, " +"πολλοί path entry finders υποστηρίζουν επίσης την ίδια παραδοσιακή μέθοδο " +"``find_module()`` που υποστηρίζουν και οι meta path finders. Ωστόσο, οι " +"μέθοδοι ``find_module()`` των path entry finders δεν καλούνται ποτέ με " +"όρισμα ``path`` (αναμένεται να έχουν καταγράψει την κατάλληλη πληροφορία " +"διαδρομής από την αρχική κλήση του path hook)." #: reference/import.rst:813 msgid "" @@ -1656,18 +1720,18 @@ msgid "" "preference to ``find_module()``." msgstr "" "Η μέθοδος ``find_module()`` στους path entry finders έχει χαρακτηριστεί ως " -"απαρχαιωμένη, καθώς δεν επιτρέπει στον path entry finder να συνεισφέρει portions σε " -"namespace πακέτα. Αν ένας path entry finder διαθέτει και ``find_loader()`` και " -"``find_module()``, το σύστημα εισαγωγής θα καλεί πάντα την ``find_loader()`` αντί για " -"την ``find_module()``." +"απαρχαιωμένη, καθώς δεν επιτρέπει στον path entry finder να συνεισφέρει " +"portions σε namespace πακέτα. Αν ένας path entry finder διαθέτει και " +"``find_loader()`` και ``find_module()``, το σύστημα εισαγωγής θα καλεί πάντα " +"την ``find_loader()`` αντί για την ``find_module()``." #: reference/import.rst:819 msgid "" "Calls to :meth:`!find_module` and :meth:`!find_loader` by the import system " "will raise :exc:`ImportWarning`." msgstr "" -"Οι κλήσεις των :meth:`!find_module` και :meth:`!find_loader` από το σύστημα εισαγωγής " -"θα κάνουν raise μία :exc:`ImportWarning`." +"Οι κλήσεις των :meth:`!find_module` και :meth:`!find_loader` από το σύστημα " +"εισαγωγής θα κάνουν raise μία :exc:`ImportWarning`." #: reference/import.rst:824 msgid "``find_module()`` and ``find_loader()`` have been removed." @@ -1683,9 +1747,10 @@ msgid "" "delete the default contents of :data:`sys.meta_path`, replacing them " "entirely with a custom meta path hook." msgstr "" -"Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος εισαγωγής " -"είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys.meta_path`, " -"αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-διαδρομής." +"Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος " +"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys." +"meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-" +"διαδρομής." #: reference/import.rst:835 msgid "" @@ -1695,11 +1760,11 @@ msgid "" "also be employed at the module level to only alter the behaviour of import " "statements within that module." msgstr "" -"Αν είναι αποδεκτό να αλλάξει μόνο η συμπεριφορά των δηλώσεων εισαγωγής χωρίς να " -"επηρεαστούν άλλα APIs που προσπελαύνουν το σύστημα εισαγωγής, τότε η αντικατάσταση της " -"ενσωματωμένης :func:`__import__` μπορεί να είναι αρκετή. Αυτή η τεχνική μπορεί επίσης " -"να εφαρμοστεί σε επίπεδο module ώστε να αλλάξει μόνο η συμπεριφορά των δηλώσεων " -"εισαγωγής μέσα σε εκείνο το module." +"Αν είναι αποδεκτό να αλλάξει μόνο η συμπεριφορά των δηλώσεων εισαγωγής χωρίς " +"να επηρεαστούν άλλα APIs που προσπελαύνουν το σύστημα εισαγωγής, τότε η " +"αντικατάσταση της ενσωματωμένης :func:`__import__` μπορεί να είναι αρκετή. " +"Αυτή η τεχνική μπορεί επίσης να εφαρμοστεί σε επίπεδο module ώστε να αλλάξει " +"μόνο η συμπεριφορά των δηλώσεων εισαγωγής μέσα σε εκείνο το module." #: reference/import.rst:841 msgid "" @@ -1710,12 +1775,12 @@ msgid "" "latter indicates that the meta path search should continue, while raising an " "exception terminates it immediately." msgstr "" -"Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook νωρίς στη " -"μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα εισαγωγής), αρκεί να " -"κάνετε raise το :exc:`ModuleNotFoundError` απευθείας από " -"τη :meth:`~importlib.abc.MetaPathFinder.find_spec` αντί να επιστρέψετε ``None``. Το " -"``None`` δηλώνει ότι η αναζήτηση στη μεταδιαδρομή πρέπει να συνεχιστεί, ενώ η υποβολή " -"αιτήματος εξαίρεσης την τερματίζει άμεσα." +"Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook " +"νωρίς στη μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα " +"εισαγωγής), αρκεί να κάνετε raise το :exc:`ModuleNotFoundError` απευθείας " +"από τη :meth:`~importlib.abc.MetaPathFinder.find_spec` αντί να επιστρέψετε " +"``None``. Το ``None`` δηλώνει ότι η αναζήτηση στη μεταδιαδρομή πρέπει να " +"συνεχιστεί, ενώ η υποβολή αιτήματος εξαίρεσης την τερματίζει άμεσα." #: reference/import.rst:851 msgid "Package Relative Imports" @@ -1728,10 +1793,11 @@ msgid "" "a relative import to the parent(s) of the current package, one level per dot " "after the first. For example, given the following package layout::" msgstr "" -"Οι σχετικές εισαγωγές χρησιμοποιούν τελείες στην αρχή. Μια και μόνο τελεία στην αρχή " -"δηλώνει σχετική εισαγωγή που ξεκινά από το τρέχον πακέτο. Δύο ή περισσότερες τελείες " -"δηλώνουν σχετική εισαγωγή προς το/τα γονικό/ά του τρέχοντος πακέτου, ένα επίπεδο ανά " -"τελεία μετά την πρώτη. Για παράδειγμα, με την ακόλουθη διάταξη πακέτου::" +"Οι σχετικές εισαγωγές χρησιμοποιούν τελείες στην αρχή. Μια και μόνο τελεία " +"στην αρχή δηλώνει σχετική εισαγωγή που ξεκινά από το τρέχον πακέτο. Δύο ή " +"περισσότερες τελείες δηλώνουν σχετική εισαγωγή προς το/τα γονικό/ά του " +"τρέχοντος πακέτου, ένα επίπεδο ανά τελεία μετά την πρώτη. Για παράδειγμα, με " +"την ακόλουθη διάταξη πακέτου::" #: reference/import.rst:858 msgid "" @@ -1762,8 +1828,8 @@ msgid "" "In either ``subpackage1/moduleX.py`` or ``subpackage1/__init__.py``, the " "following are valid relative imports::" msgstr "" -"Είτε στο ``subpackage1/moduleX.py`` είτε στο ``subpackage1/__init__.py``, τα παρακάτω " -"είναι έγκυρες σχετικές εισαγωγές::" +"Είτε στο ``subpackage1/moduleX.py`` είτε στο ``subpackage1/__init__.py``, τα " +"παρακάτω είναι έγκυρες σχετικές εισαγωγές::" #: reference/import.rst:872 msgid "" @@ -1787,9 +1853,9 @@ msgid "" "syntax, but relative imports may only use the second form; the reason for " "this is that::" msgstr "" -"Οι απόλυτες εισαγωγές μπορούν να χρησιμοποιούν είτε τη σύνταξη ``import <>`` είτε τη " -"``from <> import <>``, αλλά οι σχετικές εισαγωγές μπορούν να χρησιμοποιούν μόνο τη " -"δεύτερη μορφή· ο λόγος είναι ότι::" +"Οι απόλυτες εισαγωγές μπορούν να χρησιμοποιούν είτε τη σύνταξη ``import <>`` " +"είτε τη ``from <> import <>``, αλλά οι σχετικές εισαγωγές μπορούν να " +"χρησιμοποιούν μόνο τη δεύτερη μορφή· ο λόγος είναι ότι::" #: reference/import.rst:883 msgid "import XXX.YYY.ZZZ" @@ -1800,8 +1866,8 @@ msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" -"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το .moduleY " -"δεν είναι έγκυρη έκφραση." +"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το ." +"moduleY δεν είναι έγκυρη έκφραση." #: reference/import.rst:892 msgid "Special considerations for __main__" @@ -1817,12 +1883,13 @@ msgid "" "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" -"Το module :mod:`__main__` είναι μια ειδική περίπτωση σε σχέση με το σύστημα εισαγωγής " -"της Python. Όπως σημειώνεται :ref:`αλλού `, το ``__main__`` αρχικοποιείται " -"απευθείας κατά την εκκίνηση του διερμηνέα, όπως και τα :mod:`sys` και :mod:`builtins`. " -"Ωστόσο, σε αντίθεση με αυτά τα δύο, δεν χαρακτηρίζεται αυστηρά ως ενσωματωμένο module. " -"Αυτό συμβαίνει επειδή ο τρόπος με τον οποίο αρχικοποιείται το ``__main__`` εξαρτάται " -"από τις σημαίες και άλλες επιλογές με τις οποίες καλείται ο διερμηνέας." +"Το module :mod:`__main__` είναι μια ειδική περίπτωση σε σχέση με το σύστημα " +"εισαγωγής της Python. Όπως σημειώνεται :ref:`αλλού `, το " +"``__main__`` αρχικοποιείται απευθείας κατά την εκκίνηση του διερμηνέα, όπως " +"και τα :mod:`sys` και :mod:`builtins`. Ωστόσο, σε αντίθεση με αυτά τα δύο, " +"δεν χαρακτηρίζεται αυστηρά ως ενσωματωμένο module. Αυτό συμβαίνει επειδή ο " +"τρόπος με τον οποίο αρχικοποιείται το ``__main__`` εξαρτάται από τις σημαίες " +"και άλλες επιλογές με τις οποίες καλείται ο διερμηνέας." #: reference/import.rst:905 msgid "__main__.__spec__" @@ -1833,8 +1900,8 @@ msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" -"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__.__spec__`` ορίζεται " -"κατάλληλα ή σε ``None``." +"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__." +"__spec__`` ορίζεται κατάλληλα ή σε ``None``." #: reference/import.rst:910 msgid "" @@ -1843,10 +1910,10 @@ msgid "" "populated when the ``__main__`` module is loaded as part of executing a " "directory, zipfile or other :data:`sys.path` entry." msgstr "" -"Όταν η Python ξεκινά με την επιλογή :option:`-m`, το ``__spec__`` ορίζεται στο module " -"spec του αντίστοιχου module ή πακέτου. Το ``__spec__`` συμπληρώνεται επίσης όταν το " -"module ``__main__`` φορτώνεται ως μέρος της εκτέλεσης ενός καταλόγου, zipfile ή άλλης " -"εγγραφής του :data:`sys.path`." +"Όταν η Python ξεκινά με την επιλογή :option:`-m`, το ``__spec__`` ορίζεται " +"στο module spec του αντίστοιχου module ή πακέτου. Το ``__spec__`` " +"συμπληρώνεται επίσης όταν το module ``__main__`` φορτώνεται ως μέρος της " +"εκτέλεσης ενός καταλόγου, zipfile ή άλλης εγγραφής του :data:`sys.path`." #: reference/import.rst:915 msgid "" @@ -1854,9 +1921,9 @@ msgid "" "__spec__`` is set to ``None``, as the code used to populate the :mod:" "`__main__` does not correspond directly with an importable module:" msgstr "" -"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__.__spec__`` " -"ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να γεμίσει " -"το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" +"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__." +"__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να " +"γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" #: reference/import.rst:919 msgid "interactive prompt" @@ -1881,10 +1948,10 @@ msgid "" "the :option:`-m` switch if valid module metadata is desired in :mod:" "`__main__`." msgstr "" -"Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα ``None``, " -"*ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας ως module. " -"Χρησιμοποιήστε το switch :option:`-m` αν χρειάζεστε έγκυρα module μεταδεδομένων " -"στο :mod:`__main__`." +"Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα " +"``None``, *ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας " +"ως module. Χρησιμοποιήστε το switch :option:`-m` αν χρειάζεστε έγκυρα module " +"μεταδεδομένων στο :mod:`__main__`." #: reference/import.rst:929 msgid "" @@ -1894,11 +1961,12 @@ msgid "" "__name__ == \"__main__\":`` checks only execute when the module is used to " "populate the ``__main__`` namespace, and not during normal import." msgstr "" -"Σημειώστε επίσης ότι ακόμη κι όταν το ``__main__`` αντιστοιχεί σε εισαγόμενα module και " -"το ``__main__.__spec__`` ορίζεται ανάλογα, εξακολουθούν να θεωρούνται *διακριτά* " -"modules. Αυτό οφείλεται στο ότι μπλοκ κώδικα που προστατεύονται από ελέγχους ``if " -"__name__ == \"__main__\":`` εκτελούνται μόνο όταν το module χρησιμοποιείται για να " -"γεμίσει το namespace του ``__main__``, και όχι κατά την κανονική εισαγωγή." +"Σημειώστε επίσης ότι ακόμη κι όταν το ``__main__`` αντιστοιχεί σε εισαγόμενα " +"module και το ``__main__.__spec__`` ορίζεται ανάλογα, εξακολουθούν να " +"θεωρούνται *διακριτά* modules. Αυτό οφείλεται στο ότι μπλοκ κώδικα που " +"προστατεύονται από ελέγχους ``if __name__ == \"__main__\":`` εκτελούνται " +"μόνο όταν το module χρησιμοποιείται για να γεμίσει το namespace του " +"``__main__``, και όχι κατά την κανονική εισαγωγή." #: reference/import.rst:937 msgid "References" @@ -1911,18 +1979,18 @@ msgid "" "packages/>`_ is still available to read, although some details have changed " "since the writing of that document." msgstr "" -"Ο μηχανισμός εισαγωγής έχει εξελιχθεί σημαντικά από τα πρώτα χρόνια της Python. Η " -"αρχική `προδιαγραφή για πακέτα `_ είναι " -"ακόμη διαθέσιμη προς ανάγνωση, αν και ορισμένες λεπτομέρειες έχουν αλλάξει από τότε που " -"γράφτηκε αυτό το κείμενο." +"Ο μηχανισμός εισαγωγής έχει εξελιχθεί σημαντικά από τα πρώτα χρόνια της " +"Python. Η αρχική `προδιαγραφή για πακέτα `_ είναι ακόμη διαθέσιμη προς ανάγνωση, αν και ορισμένες " +"λεπτομέρειες έχουν αλλάξει από τότε που γράφτηκε αυτό το κείμενο." #: reference/import.rst:944 msgid "" "The original specification for :data:`sys.meta_path` was :pep:`302`, with " "subsequent extension in :pep:`420`." msgstr "" -"Η αρχική προδιαγραφή για το :data:`sys.meta_path` ήταν το :pep:`302`, με μεταγενέστερη " -"επέκταση στο :pep:`420`." +"Η αρχική προδιαγραφή για το :data:`sys.meta_path` ήταν το :pep:`302`, με " +"μεταγενέστερη επέκταση στο :pep:`420`." #: reference/import.rst:947 msgid "" @@ -1930,17 +1998,17 @@ msgid "" "Python 3.3. :pep:`420` also introduced the :meth:`!find_loader` protocol as " "an alternative to :meth:`!find_module`." msgstr "" -"Το :pep:`420` εισήγαγε τα :term:`namespace πακέτα ` στην Python 3.3. " -"Το :pep:`420` εισήγαγε επίσης το πρωτόκολλο :meth:`!find_loader` ως εναλλακτική " -"της :meth:`!find_module`." +"Το :pep:`420` εισήγαγε τα :term:`namespace πακέτα ` στην " +"Python 3.3. Το :pep:`420` εισήγαγε επίσης το πρωτόκολλο :meth:`!find_loader` " +"ως εναλλακτική της :meth:`!find_module`." #: reference/import.rst:951 msgid "" ":pep:`366` describes the addition of the ``__package__`` attribute for " "explicit relative imports in main modules." msgstr "" -"Το :pep:`366` περιγράφει την προσθήκη του χαρακτηριστικού ``__package__`` για ρητές " -"σχετικές εισαγωγές σε κύρια modules." +"Το :pep:`366` περιγράφει την προσθήκη του χαρακτηριστικού ``__package__`` " +"για ρητές σχετικές εισαγωγές σε κύρια modules." #: reference/import.rst:954 msgid "" @@ -1948,8 +2016,9 @@ msgid "" "proposed ``__name__`` for semantics :pep:`366` would eventually specify for " "``__package__``." msgstr "" -"Το :pep:`328` εισήγαγε απόλυτες και ρητές σχετικές εισαγωγές και αρχικά πρότεινε το " -"``__name__`` για τη σημασιολογία που το :pep:`366` τελικά όρισε για το ``__package__``." +"Το :pep:`328` εισήγαγε απόλυτες και ρητές σχετικές εισαγωγές και αρχικά " +"πρότεινε το ``__name__`` για τη σημασιολογία που το :pep:`366` τελικά όρισε " +"για το ``__package__``." #: reference/import.rst:958 msgid ":pep:`338` defines executing modules as scripts." @@ -1963,10 +2032,11 @@ msgid "" "of several APIs in the import system and also addition of new methods to " "finders and loaders." msgstr "" -"Το :pep:`451` προσθέτει την ενθυλάκωση της κατάστασης εισαγωγής ανά module σε spec " -"αντικείμενα. Επίσης μεταφέρει το μεγαλύτερο μέρος των τυποποιημένων ευθυνών των loaders " -"πίσω στον μηχανισμό εισαγωγής. Αυτές οι αλλαγές επιτρέπουν την απόσυρση αρκετών APIs " -"στο σύστημα εισαγωγής και επίσης την προσθήκη νέων μεθόδων σε finders και loaders." +"Το :pep:`451` προσθέτει την ενθυλάκωση της κατάστασης εισαγωγής ανά module " +"σε spec αντικείμενα. Επίσης μεταφέρει το μεγαλύτερο μέρος των τυποποιημένων " +"ευθυνών των loaders πίσω στον μηχανισμό εισαγωγής. Αυτές οι αλλαγές " +"επιτρέπουν την απόσυρση αρκετών APIs στο σύστημα εισαγωγής και επίσης την " +"προσθήκη νέων μεθόδων σε finders και loaders." #: reference/import.rst:967 msgid "Footnotes" @@ -1984,12 +2054,12 @@ msgid "" "replace itself in :data:`sys.modules`. This is implementation-specific " "behavior that is not guaranteed to work in other Python implementations." msgstr "" -"Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή επιστροφής. Αντ’ " -"αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα του module " -"στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα εισηγμένο module μπορεί να " -"αντικαταστήσει τον εαυτό του στο :data:`sys.modules`. Αυτή είναι μία ειδική συμπεριφορά " -"της συγκεκριμένης υλοποίησης και δεν είναι εγγυημένο ότι λειτουργεί σε άλλες " -"υλοποιήσεις της Python." +"Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή " +"επιστροφής. Αντ’ αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα " +"του module στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα " +"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του στο :data:`sys." +"modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης υλοποίησης και " +"δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της Python." #: reference/import.rst:8 msgid "import machinery" From 000ed00e4d5b6fe2ac294d2458bcf313c0f50655 Mon Sep 17 00:00:00 2001 From: vadal Date: Tue, 24 Feb 2026 18:02:23 +0200 Subject: [PATCH 03/17] Add missing words to dictionary --- dictionaries/main.txt | 25 +++++++++++++++++++++++++ reference/import.po | 6 +++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 9995e9d1..542c2cb4 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -2111,3 +2111,28 @@ zoneinfo ψευδοτυχαίων ό ότι +subpackages +subpackage +portion +επαναρχικοποιήσει +importers +εντοπίσιμο +specs +hooks +επαναφόρτωση +attrs +ψευδοκώδικα +Reprs +origin +checked +unchecked +caches +zipfiles +διακρίνοντάς +entries +overhead +προσπελαύνουν +μεταδιαδρομή +moduleY +zipfile + diff --git a/reference/import.po b/reference/import.po index 734af341..61ac3654 100644 --- a/reference/import.po +++ b/reference/import.po @@ -368,7 +368,7 @@ msgid "" "module object." msgstr "" "Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:" -"`sys.modules`. Αυτη η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " +"`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " "modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων " "διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί προηγουμένως, το :data:" "`sys.modules` θα περιέχει εγγραφές για τα ``foo``, ``foo.bar`` και ``foo.bar." @@ -1392,7 +1392,7 @@ msgstr "" "Ο path based finder παρέχει επιπλέον hooks και πρωτόκολλα ώστε να μπορείτε " "να επεκτείνετε και να προσαρμόσετε τους τύπους των καταχωρήσεων διαδρομής " "που μπορούν να αναζητηθούν. Για παράδειγμα, αν θέλατε να υποστηρίξετε " -"καταχωρήσεις διαδρομής ως network URLs, θα μπορούσατε να γράψετε ένα hook " +"καταχωρήσεις διαδρομής ως δικτυακά URLs, θα μπορούσατε να γράψετε ένα hook " "που υλοποιεί HTTP σημασιολογία για να βρίσκει modules στο διαδίκτυο. Αυτό το " "hook (ένα callable) θα επέστρεφε έναν :term:`path entry finder` που " "υποστηρίζει το πρωτόκολλο που περιγράφεται παρακάτω, και στη συνέχεια θα " @@ -1587,7 +1587,7 @@ msgstr "" "term:`path entry finder`, τότε η μέθοδος :meth:`~importlib.machinery." "PathFinder.find_spec` του path based finder θα αποθηκεύσει ``None`` στο :" "data:`sys.path_importer_cache` (για να δηλώσει ότι δεν υπάρχει finder για " -"αυτη την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " +"αυτή την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " "αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." #: reference/import.rst:760 From 65fb6ba7cdfa5877dea5134deeefad0e37c40fe3 Mon Sep 17 00:00:00 2001 From: vadal Date: Tue, 24 Feb 2026 18:15:17 +0200 Subject: [PATCH 04/17] Add missing words to dictionary --- reference/import.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/import.po b/reference/import.po index 61ac3654..c9c0e685 100644 --- a/reference/import.po +++ b/reference/import.po @@ -293,7 +293,7 @@ msgid "" msgstr "" "Τα namespace πακέτα δεν χρησιμοποιούν μια συνηθισμένη λίστα για το " "χαρακτηριστικό ``__path__``. Αντί γι’ αυτό χρησιμοποιούν έναν προσαρμοσμένο " -"iterable τύπο, ο οποίος θα εκτελέσει αυτόματα νέα αναζήτηση για portions του " +"iterable τύπο, ο οποίος θα εκτελέσει αυτόματα μία νέα αναζήτηση για portions του " "πακέτου στην επόμενη προσπάθεια εισαγωγής μέσα σε αυτό το πακέτο, αν αλλάξει " "το path του γονικού πακέτου (ή το :data:`sys.path` για πακέτο ανωτέρου " "επιπέδου)." From 3788400f41dab21d2e929c7907215ee564008bf9 Mon Sep 17 00:00:00 2001 From: vadal Date: Tue, 24 Feb 2026 18:20:13 +0200 Subject: [PATCH 05/17] Add missing words to dictionary --- dictionaries/main.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 542c2cb4..6e10b525 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -2135,4 +2135,7 @@ overhead μεταδιαδρομή moduleY zipfile - +launcher +specifier +monkey +Launch From 0aeb588d6eab59a66d3d4930aebe09e949e49044 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 12:40:12 +0200 Subject: [PATCH 06/17] Add missing words to dictionary --- dictionaries/main.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 6e10b525..4e30bd0e 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -2139,3 +2139,5 @@ launcher specifier monkey Launch +specifically +specifiers From aa2481c2be390b4bcd3685b1800475caf767598b Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 12:44:00 +0200 Subject: [PATCH 07/17] Add missing words to dictionary --- dictionaries/main.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 4e30bd0e..1bab0612 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -2141,3 +2141,4 @@ monkey Launch specifically specifiers +automatically From 0188c3acdb1d8f67737ff77a256f672360854fe8 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 17:10:47 +0200 Subject: [PATCH 08/17] Add missing words to dictionary --- dictionaries/main.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 1bab0612..3af03d64 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -2140,5 +2140,5 @@ specifier monkey Launch specifically -specifiers automatically +specifiers From f7c1ca3098629cca61bea67e38fc2b803c702c45 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 17:23:23 +0200 Subject: [PATCH 09/17] Add powrap changes --- reference/import.po | 679 ++++++++++++++++++++++---------------------- 1 file changed, 346 insertions(+), 333 deletions(-) diff --git a/reference/import.po b/reference/import.po index c9c0e685..c2eb9fb0 100644 --- a/reference/import.po +++ b/reference/import.po @@ -26,15 +26,16 @@ msgid "" "Python code in one :term:`module` gains access to the code in another module " "by the process of :term:`importing` it. The :keyword:`import` statement is " "the most common way of invoking the import machinery, but it is not the only " -"way. Functions such as :func:`importlib.import_module` and built-in :func:" -"`__import__` can also be used to invoke the import machinery." +"way. Functions such as :func:`importlib.import_module` and built-" +"in :func:`__import__` can also be used to invoke the import machinery." msgstr "" "Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός " -"άλλου module μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:" -"`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού " -"import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως η :func:`importlib." -"import_module` και η ενσωματωμένη :func:`__import__` μπορούν επίσης να " -"χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού εισαγωγής." +"άλλου module μέσω της διαδικασίας του :term:`importing`. Η " +"δήλωση :keyword:`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του " +"μηχανισμού import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως " +"η :func:`importlib.import_module` και η ενσωματωμένη :func:`__import__` " +"μπορούν επίσης να χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού " +"εισαγωγής." #: reference/import.rst:16 msgid "" @@ -43,18 +44,19 @@ msgid "" "local scope. The search operation of the :keyword:`!import` statement is " "defined as a call to the :func:`__import__` function, with the appropriate " "arguments. The return value of :func:`__import__` is used to perform the " -"name binding operation of the :keyword:`!import` statement. See the :" -"keyword:`!import` statement for the exact details of that name binding " +"name binding operation of the :keyword:`!import` statement. See " +"the :keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" "Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με " "το συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της " "αναζήτησης σε ένα όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της " -"δήλωσης :keyword:`!import` ορίζεται ως κλήση της συνάρτησης :func:" -"`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής της :func:" -"`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " -"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` " -"για τις ακριβείς λεπτομέρειες αυτής της λειτουργίας." +"δήλωσης :keyword:`!import` ορίζεται ως κλήση της " +"συνάρτησης :func:`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής " +"της :func:`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία " +"δέσμευσης ονόματος της δήλωσης :keyword:`!import`. Δείτε τη " +"δήλωση :keyword:`!import` για τις ακριβείς λεπτομέρειες αυτής της " +"λειτουργίας." #: reference/import.rst:25 msgid "" @@ -72,10 +74,11 @@ msgstr "" #: reference/import.rst:31 msgid "" -"When an :keyword:`import` statement is executed, the standard builtin :func:" -"`__import__` function is called. Other mechanisms for invoking the import " -"system (such as :func:`importlib.import_module`) may choose to bypass :func:" -"`__import__` and use their own solutions to implement import semantics." +"When an :keyword:`import` statement is executed, the standard " +"builtin :func:`__import__` function is called. Other mechanisms for invoking " +"the import system (such as :func:`importlib.import_module`) may choose to " +"bypass :func:`__import__` and use their own solutions to implement import " +"semantics." msgstr "" "Όταν εκτελείται μια δήλωση :keyword:`import`, καλείται η τυπική ενσωματωμένη " "συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος " @@ -94,24 +97,24 @@ msgid "" msgstr "" "Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το " "βρει, δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το " -"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η εξαίρεση :" -"exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " -"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι " -"στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks " -"που περιγράφονται στις παρακάτω ενότητες." +"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η " +"εξαίρεση :exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές " +"αναζήτησης για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές " +"οι στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων " +"hooks που περιγράφονται στις παρακάτω ενότητες." #: reference/import.rst:43 msgid "" -"The import system has been updated to fully implement the second phase of :" -"pep:`302`. There is no longer any implicit import machinery - the full " +"The import system has been updated to fully implement the second phase " +"of :pep:`302`. There is no longer any implicit import machinery - the full " "import system is exposed through :data:`sys.meta_path`. In addition, native " "namespace package support has been implemented (see :pep:`420`)." msgstr "" "Το σύστημα εισαγωγής έχει ενημερωθεί ώστε να υλοποιεί πλήρως τη δεύτερη φάση " "του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο " "πλήρης μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. " -"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages (βλ. :" -"pep:`420`)." +"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages " +"(βλ. :pep:`420`)." #: reference/import.rst:51 msgid ":mod:`importlib`" @@ -190,8 +193,8 @@ msgstr "" "το όνομα του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη " "πρόσβασης σε χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package " "με όνομα :mod:`email`, το οποίο με τη σειρά του έχει ένα subpackage με " -"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με όνομα :" -"mod:`email.mime.text`." +"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με " +"όνομα :mod:`email.mime.text`." #: reference/import.rst:93 msgid "Regular packages" @@ -203,11 +206,11 @@ msgid "" "package>` and :term:`namespace packages `. Regular " "packages are traditional packages as they existed in Python 3.2 and earlier. " "A regular package is typically implemented as a directory containing an " -"``__init__.py`` file. When a regular package is imported, this ``__init__." -"py`` file is implicitly executed, and the objects it defines are bound to " -"names in the package's namespace. The ``__init__.py`` file can contain the " -"same Python code that any other module can contain, and Python will add some " -"additional attributes to the module when it is imported." +"``__init__.py`` file. When a regular package is imported, this " +"``__init__.py`` file is implicitly executed, and the objects it defines are " +"bound to names in the package's namespace. The ``__init__.py`` file can " +"contain the same Python code that any other module can contain, and Python " +"will add some additional attributes to the module when it is imported." msgstr "" "Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και τα :term:`namespace packages `. Τα regular " @@ -293,10 +296,10 @@ msgid "" msgstr "" "Τα namespace πακέτα δεν χρησιμοποιούν μια συνηθισμένη λίστα για το " "χαρακτηριστικό ``__path__``. Αντί γι’ αυτό χρησιμοποιούν έναν προσαρμοσμένο " -"iterable τύπο, ο οποίος θα εκτελέσει αυτόματα μία νέα αναζήτηση για portions του " -"πακέτου στην επόμενη προσπάθεια εισαγωγής μέσα σε αυτό το πακέτο, αν αλλάξει " -"το path του γονικού πακέτου (ή το :data:`sys.path` για πακέτο ανωτέρου " -"επιπέδου)." +"iterable τύπο, ο οποίος θα εκτελέσει αυτόματα μία νέα αναζήτηση για portions " +"του πακέτου στην επόμενη προσπάθεια εισαγωγής μέσα σε αυτό το πακέτο, αν " +"αλλάξει το path του γονικού πακέτου (ή το :data:`sys.path` για πακέτο " +"ανωτέρου επιπέδου)." #: reference/import.rst:149 msgid "" @@ -335,24 +338,24 @@ msgstr "" "Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως " "αναγνωρισμένο ` όνομα του module (ή του πακέτου, αλλά για " "τους σκοπούς αυτής της συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. " -"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της δήλωσης :keyword:" -"`import` ή από τις παραμέτρους των συναρτήσεων :func:`importlib." -"import_module` ή :func:`__import__`." +"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της " +"δήλωσης :keyword:`import` ή από τις παραμέτρους των " +"συναρτήσεων :func:`importlib.import_module` ή :func:`__import__`." #: reference/import.rst:168 msgid "" "This name will be used in various phases of the import search, and it may be " "the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python " -"first tries to import ``foo``, then ``foo.bar``, and finally ``foo.bar." -"baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " -"is raised." +"first tries to import ``foo``, then ``foo.bar``, and finally " +"``foo.bar.baz``. If any of the intermediate imports fail, " +"a :exc:`ModuleNotFoundError` is raised." msgstr "" "Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και " -"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar." -"baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει το " -"``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " -"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise η :exc:" -"`ModuleNotFoundError`." +"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. " +"``foo.bar.baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει " +"το ``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " +"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise " +"η :exc:`ModuleNotFoundError`." #: reference/import.rst:175 msgid "The module cache" @@ -367,20 +370,21 @@ msgid "" "and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" -"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:" -"`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " -"modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων " -"διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί προηγουμένως, το :data:" -"`sys.modules` θα περιέχει εγγραφές για τα ``foo``, ``foo.bar`` και ``foo.bar." -"baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο module." +"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι " +"το :data:`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη " +"όλων των modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των " +"ενδιάμεσων διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί " +"προηγουμένως, το :data:`sys.modules` θα περιέχει εγγραφές για τα ``foo``, " +"``foo.bar`` και ``foo.bar.baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο " +"αντικείμενο module." #: reference/import.rst:187 msgid "" "During import, the module name is looked up in :data:`sys.modules` and if " "present, the associated value is the module satisfying the import, and the " -"process completes. However, if the value is ``None``, then a :exc:" -"`ModuleNotFoundError` is raised. If the module name is missing, Python will " -"continue searching for the module." +"process completes. However, if the value is ``None``, then " +"a :exc:`ModuleNotFoundError` is raised. If the module name is missing, " +"Python will continue searching for the module." msgstr "" "Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` " "και, αν υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την " @@ -394,24 +398,24 @@ msgid "" "associated module (as other modules may hold references to it), but it will " "invalidate the cache entry for the named module, causing Python to search " "anew for the named module upon its next import. The key can also be assigned " -"to ``None``, forcing the next import of the module to result in a :exc:" -"`ModuleNotFoundError`." +"to ``None``, forcing the next import of the module to result in " +"a :exc:`ModuleNotFoundError`." msgstr "" "Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να " "μην καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν " "αναφορές σε αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το " "module με το συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει " "ξανά στην επόμενο εισαγωγή. Το κλειδί μπορεί επίσης να οριστεί σε ``None``, " -"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει σε :exc:" -"`ModuleNotFoundError`." +"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει " +"σε :exc:`ModuleNotFoundError`." #: reference/import.rst:200 msgid "" "Beware though, as if you keep a reference to the module object, invalidate " "its cache entry in :data:`sys.modules`, and then re-import the named module, " -"the two module objects will *not* be the same. By contrast, :func:`importlib." -"reload` will reuse the *same* module object, and simply reinitialise the " -"module contents by rerunning the module's code." +"the two module objects will *not* be the same. By " +"contrast, :func:`importlib.reload` will reuse the *same* module object, and " +"simply reinitialise the module contents by rerunning the module's code." msgstr "" "Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την " "εγγραφή του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε " @@ -428,12 +432,12 @@ msgstr "Finders και loaders" msgid "" "If the named module is not found in :data:`sys.modules`, then Python's " "import protocol is invoked to find and load the module. This protocol " -"consists of two conceptual objects, :term:`finders ` and :term:" -"`loaders `. A finder's job is to determine whether it can find the " -"named module using whatever strategy it knows about. Objects that implement " -"both of these interfaces are referred to as :term:`importers ` - " -"they return themselves when they find that they can load the requested " -"module." +"consists of two conceptual objects, :term:`finders ` " +"and :term:`loaders `. A finder's job is to determine whether it can " +"find the named module using whatever strategy it knows about. Objects that " +"implement both of these interfaces are referred to as :term:`importers " +"` - they return themselves when they find that they can load the " +"requested module." msgstr "" "Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "τότε ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να " @@ -500,10 +504,10 @@ msgid "" "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" -"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:" -"`loaders `, ενώ τώρα επιστρέφουν module specs που *περιέχουν* " -"loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά " -"έχουν λιγότερες ευθύνες." +"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν " +"απευθείας :term:`loaders `, ενώ τώρα επιστρέφουν module specs που " +"*περιέχουν* loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την " +"εισαγωγή, αλλά έχουν λιγότερες ευθύνες." #: reference/import.rst:249 msgid "Import hooks" @@ -536,15 +540,16 @@ msgstr "" #: reference/import.rst:269 msgid "" -"Import path hooks are called as part of :data:`sys.path` (or ``package." -"__path__``) processing, at the point where their associated path item is " -"encountered. Import path hooks are registered by adding new callables to :" -"data:`sys.path_hooks` as described below." +"Import path hooks are called as part of :data:`sys.path` (or " +"``package.__path__``) processing, at the point where their associated path " +"item is encountered. Import path hooks are registered by adding new " +"callables to :data:`sys.path_hooks` as described below." msgstr "" -"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys." -"path` (ή του ``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο " -"στοιχείο διαδρομής. Τα import path hooks καταχωρίζονται προσθέτοντας νέα " -"callables στο :data:`sys.path_hooks`, όπως περιγράφεται παρακάτω." +"Τα import path hooks καλούνται ως μέρος της επεξεργασίας " +"του :data:`sys.path` (ή του ``package.__path__``), στο σημείο όπου " +"συναντάται το αντίστοιχο στοιχείο διαδρομής. Τα import path hooks " +"καταχωρίζονται προσθέτοντας νέα callables στο :data:`sys.path_hooks`, όπως " +"περιγράφεται παρακάτω." #: reference/import.rst:276 msgid "The meta path" @@ -555,21 +560,21 @@ msgid "" "When the named module is not found in :data:`sys.modules`, Python next " "searches :data:`sys.meta_path`, which contains a list of meta path finder " "objects. These finders are queried in order to see if they know how to " -"handle the named module. Meta path finders must implement a method called :" -"meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments: " -"a name, an import path, and (optionally) a target module. The meta path " -"finder can use any strategy it wants to determine whether it can handle the " -"named module or not." +"handle the named module. Meta path finders must implement a method " +"called :meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three " +"arguments: a name, an import path, and (optionally) a target module. The " +"meta path finder can use any strategy it wants to determine whether it can " +"handle the named module or not." msgstr "" "Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "η Python στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο " "περιέχει μια λίστα από meta path finder αντικείμενα. Αυτοί οι finders " "ερωτώνται με τη σειρά για να διαπιστωθεί αν γνωρίζουν πώς να χειριστούν το " -"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με όνομα :meth:" -"`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία ορίσματα: " -"ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " -"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να " -"καθορίσει αν μπορεί να χειριστεί το module ή όχι." +"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με " +"όνομα :meth:`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία " +"ορίσματα: ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο " +"meta path finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για " +"να καθορίσει αν μπορεί να χειριστεί το module ή όχι." #: reference/import.rst:291 msgid "" @@ -606,10 +611,10 @@ msgstr "" "την αναζήτηση του module. Για modules ανωτέρου επιπέδου, το δεύτερο όρισμα " "είναι ``None``, αλλά για submodules ή subpackages, είναι η τιμή του " "χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η " -"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise το :exc:" -"`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο module " -"που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα εισαγωγής " -"περνά target module μόνο κατά την επαναφόρτωση." +"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise " +"το :exc:`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο " +"module που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα " +"εισαγωγής περνά target module μόνο κατά την επαναφόρτωση." #: reference/import.rst:308 msgid "" @@ -618,19 +623,21 @@ msgid "" "importing ``foo.bar.baz`` will first perform a top level import, calling " "``mpf.find_spec(\"foo\", None, None)`` on each meta path finder (``mpf``). " "After ``foo`` has been imported, ``foo.bar`` will be imported by traversing " -"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", foo." -"__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " -"will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." +"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", " +"foo.__path__, None)``. Once ``foo.bar`` has been imported, the final " +"traversal will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " +"None)``." msgstr "" "Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα " "εισαγωγής. Για παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules " "δεν έχει ήδη προστεθεί στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` " -"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το ``mpf." -"find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). Αφού " -"εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta path " -"για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " -"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα " -"καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." +"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το " +"``mpf.find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). " +"Αφού εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta " +"path για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", " +"foo.__path__, None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική " +"διάσχιση θα καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " +"None)``." #: reference/import.rst:318 msgid "" @@ -660,30 +667,30 @@ msgid "" "The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path " "finders replaced :meth:`!find_module`, which is now deprecated. While it " "will continue to work without change, the import machinery will try it only " -"if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." -"find_spec`." +"if the finder does not " +"implement :meth:`~importlib.abc.MetaPathFinder.find_spec`." msgstr "" "Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path " "finders αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί " "ως απαρχαιωμένη. Αν και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο " -"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί τη :meth:" -"`~importlib.abc.MetaPathFinder.find_spec`." +"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί " +"τη :meth:`~importlib.abc.MetaPathFinder.find_spec`." #: reference/import.rst:334 msgid "" -"Use of :meth:`!find_module` by the import system now raises :exc:" -"`ImportWarning`." +"Use of :meth:`!find_module` by the import system now " +"raises :exc:`ImportWarning`." msgstr "" "Η χρήση της :meth:`!find_module` από το σύστημα εισαγωγής πλέον κάνει raise " "την :exc:`ImportWarning`." #: reference/import.rst:338 msgid "" -":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." -"MetaPathFinder.find_spec` instead." +":meth:`!find_module` has been removed. " +"Use :meth:`~importlib.abc.MetaPathFinder.find_spec` instead." msgstr "" -"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε την :meth:`~importlib." -"abc.MetaPathFinder.find_spec` στη θέση της." +"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε " +"την :meth:`~importlib.abc.MetaPathFinder.find_spec` στη θέση της." #: reference/import.rst:344 msgid "Loading" @@ -765,11 +772,11 @@ msgstr "Σημειώστε τις ακόλουθες λεπτομέρειες:" #: reference/import.rst:381 msgid "" -"If there is an existing module object with the given name in :data:`sys." -"modules`, import will have already returned it." +"If there is an existing module object with the given name " +"in :data:`sys.modules`, import will have already returned it." msgstr "" -"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:" -"`sys.modules`, το import θα το έχει ήδη επιστρέψει." +"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα " +"στο :data:`sys.modules`, το import θα το έχει ήδη επιστρέψει." #: reference/import.rst:384 msgid "" @@ -781,17 +788,17 @@ msgid "" msgstr "" "Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " "κώδικα του module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί " -"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys." -"modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη χειρότερη περίπτωση " -"και πολλαπλή φόρτωση στην καλύτερη." +"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του " +"στο :data:`sys.modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη " +"χειρότερη περίπτωση και πολλαπλή φόρτωση στην καλύτερη." #: reference/import.rst:390 msgid "" "If loading fails, the failing module -- and only the failing module -- gets " -"removed from :data:`sys.modules`. Any module already in the :data:`sys." -"modules` cache, and any module that was successfully loaded as a side-" -"effect, must remain in the cache. This contrasts with reloading where even " -"the failing module is left in :data:`sys.modules`." +"removed from :data:`sys.modules`. Any module already in " +"the :data:`sys.modules` cache, and any module that was successfully loaded " +"as a side-effect, must remain in the cache. This contrasts with reloading " +"where even the failing module is left in :data:`sys.modules`." msgstr "" "Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται " "από το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή " @@ -833,12 +840,12 @@ msgstr "" #: reference/import.rst:408 msgid "" "The import system has taken over the boilerplate responsibilities of " -"loaders. These were previously performed by the :meth:`importlib.abc.Loader." -"load_module` method." +"loaders. These were previously performed by " +"the :meth:`importlib.abc.Loader.load_module` method." msgstr "" "Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. " -"Αυτές εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader." -"load_module`." +"Αυτές εκτελούνταν παλαιότερα από τη " +"μέθοδο :meth:`importlib.abc.Loader.load_module`." #: reference/import.rst:414 msgid "Loaders" @@ -852,10 +859,10 @@ msgid "" "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" "Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση " -"του module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc." -"Loader.exec_module` με ένα μόνο όρισμα, το αντικείμενο module που θα " -"εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει η :meth:`~importlib.abc.Loader." -"exec_module` αγνοείται." +"του module. Ο μηχανισμός εισαγωγής καλεί τη " +"μέθοδο :meth:`importlib.abc.Loader.exec_module` με ένα μόνο όρισμα, το " +"αντικείμενο module που θα εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει " +"η :meth:`~importlib.abc.Loader.exec_module` αγνοείται." #: reference/import.rst:421 msgid "Loaders must satisfy the following requirements:" @@ -873,13 +880,13 @@ msgstr "" #: reference/import.rst:427 msgid "" -"If the loader cannot execute the module, it should raise an :exc:" -"`ImportError`, although any other exception raised during :meth:`~importlib." -"abc.Loader.exec_module` will be propagated." +"If the loader cannot execute the module, it should raise " +"an :exc:`ImportError`, although any other exception raised " +"during :meth:`~importlib.abc.Loader.exec_module` will be propagated." msgstr "" -"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise το :" -"exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά τη :" -"meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." +"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise " +"το :exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά " +"τη :meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." #: reference/import.rst:431 msgid "" @@ -888,9 +895,9 @@ msgid "" "a spec with the loader set to ``self``." msgstr "" "Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο " -"αντικείμενο· σε αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc." -"MetaPathFinder.find_spec` απλώς θα επιστρέψει ένα spec με τον loader " -"ορισμένο σε ``self``." +"αντικείμενο· σε αυτές τις περιπτώσεις, η " +"μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` απλώς θα επιστρέψει " +"ένα spec με τον loader ορισμένο σε ``self``." #: reference/import.rst:435 msgid "" @@ -902,12 +909,12 @@ msgid "" "will create the new module itself." msgstr "" "Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module " -"κατά τη φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader." -"create_module`. Παίρνει ένα όρισμα, το module spec, και επιστρέφει το νέο " -"αντικείμενο module που θα χρησιμοποιηθεί κατά τη φόρτωση. Η " -"``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο αντικείμενο " -"module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " -"δημιουργήσει ο ίδιος το νέο module." +"κατά τη φόρτωση υλοποιώντας μια " +"μέθοδο :meth:`~importlib.abc.Loader.create_module`. Παίρνει ένα όρισμα, το " +"module spec, και επιστρέφει το νέο αντικείμενο module που θα χρησιμοποιηθεί " +"κατά τη φόρτωση. Η ``create_module()`` δεν χρειάζεται να ορίσει " +"χαρακτηριστικά στο αντικείμενο module. Αν η μέθοδος επιστρέψει ``None``, ο " +"μηχανισμός εισαγωγής θα δημιουργήσει ο ίδιος το νέο module." #: reference/import.rst:442 msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." @@ -915,13 +922,13 @@ msgstr "Η μέθοδος :meth:`~importlib.abc.Loader.create_module` των loa #: reference/import.rst:445 msgid "" -"The :meth:`~importlib.abc.Loader.load_module` method was replaced by :meth:" -"`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " -"boilerplate responsibilities of loading." +"The :meth:`~importlib.abc.Loader.load_module` method was replaced " +"by :meth:`~importlib.abc.Loader.exec_module` and the import machinery " +"assumed all the boilerplate responsibilities of loading." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από την :" -"meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε " -"όλες τις τυποποιημένες ευθύνες της φόρτωσης." +"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από " +"την :meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής " +"ανέλαβε όλες τις τυποποιημένες ευθύνες της φόρτωσης." #: reference/import.rst:450 msgid "" @@ -947,16 +954,16 @@ msgstr "" #: reference/import.rst:459 msgid "" -"If there is an existing module object with the given name in :data:`sys." -"modules`, the loader must use that existing module. (Otherwise, :func:" -"`importlib.reload` will not work correctly.) If the named module does not " -"exist in :data:`sys.modules`, the loader must create a new module object and " -"add it to :data:`sys.modules`." +"If there is an existing module object with the given name " +"in :data:`sys.modules`, the loader must use that existing module. " +"(Otherwise, :func:`importlib.reload` will not work correctly.) If the named " +"module does not exist in :data:`sys.modules`, the loader must create a new " +"module object and add it to :data:`sys.modules`." msgstr "" -"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys." -"modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. " -"(Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το " -"module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " +"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα " +"στο :data:`sys.modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον " +"module. (Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) " +"Αν το module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " "loader πρέπει να δημιουργήσει νέο αντικείμενο module και να το προσθέσει " "στο :data:`sys.modules`." @@ -971,9 +978,9 @@ msgstr "" #: reference/import.rst:469 msgid "" -"If loading fails, the loader must remove any modules it has inserted into :" -"data:`sys.modules`, but it must remove **only** the failing module(s), and " -"only if the loader itself has loaded the module(s) explicitly." +"If loading fails, the loader must remove any modules it has inserted " +"into :data:`sys.modules`, but it must remove **only** the failing module(s), " +"and only if the loader itself has loaded the module(s) explicitly." msgstr "" "Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει " "εισάγει στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα " @@ -1065,9 +1072,9 @@ msgstr "" msgid "" "Given Python's familiar name binding rules this might seem surprising, but " "it's actually a fundamental feature of the import system. The invariant " -"holding is that if you have ``sys.modules['spam']`` and ``sys.modules['spam." -"foo']`` (as you would after the above import), the latter must appear as the " -"``foo`` attribute of the former." +"holding is that if you have ``sys.modules['spam']`` and " +"``sys.modules['spam.foo']`` (as you would after the above import), the " +"latter must appear as the ``foo`` attribute of the former." msgstr "" "Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό " "μπορεί να φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες " @@ -1111,8 +1118,8 @@ msgstr "" msgid "" "The module's spec is exposed as :attr:`module.__spec__`. Setting :attr:`!" "__spec__` appropriately applies equally to :ref:`modules initialized during " -"interpreter startup `. The one exception is ``__main__``, where :" -"attr:`!__spec__` is :ref:`set to None in some cases `." +"interpreter startup `. The one exception is ``__main__``, " +"where :attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" "Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " "του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται " @@ -1134,10 +1141,10 @@ msgstr "Χαρακτηριστικά __path__ στα modules" #: reference/import.rst:550 msgid "" -"The :attr:`~module.__path__` attribute should be a (possibly empty) :term:" -"`sequence` of strings enumerating the locations where the package's " -"submodules will be found. By definition, if a module has a :attr:`!__path__` " -"attribute, it is a :term:`package`." +"The :attr:`~module.__path__` attribute should be a (possibly " +"empty) :term:`sequence` of strings enumerating the locations where the " +"package's submodules will be found. By definition, if a module has a :attr:`!" +"__path__` attribute, it is a :term:`package`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια " "(ενδεχομένως κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις " @@ -1147,10 +1154,10 @@ msgstr "" #: reference/import.rst:555 msgid "" "A package's :attr:`~module.__path__` attribute is used during imports of its " -"subpackages. Within the import machinery, it functions much the same as :" -"data:`sys.path`, i.e. providing a list of locations to search for modules " -"during import. However, :attr:`!__path__` is typically much more constrained " -"than :data:`!sys.path`." +"subpackages. Within the import machinery, it functions much the same " +"as :data:`sys.path`, i.e. providing a list of locations to search for " +"modules during import. However, :attr:`!__path__` is typically much more " +"constrained than :data:`!sys.path`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά " "την εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί " @@ -1171,20 +1178,21 @@ msgstr "" #: reference/import.rst:566 msgid "" -"A package's ``__init__.py`` file may set or alter the package's :attr:" -"`~module.__path__` attribute, and this was typically the way namespace " -"packages were implemented prior to :pep:`420`. With the adoption of :pep:" -"`420`, namespace packages no longer need to supply ``__init__.py`` files " -"containing only :attr:`!__path__` manipulation code; the import machinery " -"automatically sets :attr:`!__path__` correctly for the namespace package." +"A package's ``__init__.py`` file may set or alter the " +"package's :attr:`~module.__path__` attribute, and this was typically the way " +"namespace packages were implemented prior to :pep:`420`. With the adoption " +"of :pep:`420`, namespace packages no longer need to supply ``__init__.py`` " +"files containing only :attr:`!__path__` manipulation code; the import " +"machinery automatically sets :attr:`!__path__` correctly for the namespace " +"package." msgstr "" "Το αρχείο ``__init__.py`` ενός πακέτου μπορεί να ορίζει ή να τροποποιεί το " "χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως " "ο τρόπος με τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. " "Με την υιοθέτηση του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να " -"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :" -"attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά το :attr:`!" -"__path__` για το namespace πακέτο." +"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού " +"του :attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά " +"το :attr:`!__path__` για το namespace πακέτο." #: reference/import.rst:575 msgid "Module reprs" @@ -1205,9 +1213,9 @@ msgid "" "If the module has a spec (``__spec__``), the import machinery will try to " "generate a repr from it. If that fails or there is no spec, the import " "system will craft a default repr using whatever information is available on " -"the module. It will try to use the ``module.__name__``, ``module." -"__file__``, and ``module.__loader__`` as input into the repr, with defaults " -"for whatever information is missing." +"the module. It will try to use the ``module.__name__``, " +"``module.__file__``, and ``module.__loader__`` as input into the repr, with " +"defaults for whatever information is missing." msgstr "" "Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει " "να παράγει repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα " @@ -1288,14 +1296,14 @@ msgstr "" msgid "" "Python also supports \"hash-based\" cache files, which store a hash of the " "source file's contents rather than its metadata. There are two variants of " -"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based ``." -"pyc`` files, Python validates the cache file by hashing the source file and " -"comparing the resulting hash with the hash in the cache file. If a checked " -"hash-based cache file is found to be invalid, Python regenerates it and " -"writes a new checked hash-based cache file. For unchecked hash-based ``." -"pyc`` files, Python simply assumes the cache file is valid if it exists. " -"Hash-based ``.pyc`` files validation behavior may be overridden with the :" -"option:`--check-hash-based-pycs` flag." +"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based " +"``.pyc`` files, Python validates the cache file by hashing the source file " +"and comparing the resulting hash with the hash in the cache file. If a " +"checked hash-based cache file is found to be invalid, Python regenerates it " +"and writes a new checked hash-based cache file. For unchecked hash-based " +"``.pyc`` files, Python simply assumes the cache file is valid if it exists. " +"Hash-based ``.pyc`` files validation behavior may be overridden with " +"the :option:`--check-hash-based-pycs` flag." msgstr "" "Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα " "οποία αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα " @@ -1326,17 +1334,17 @@ msgstr "Finder βασισμένος στη διαδρομή" #: reference/import.rst:641 msgid "" "As mentioned previously, Python comes with several default meta path " -"finders. One of these, called the :term:`path based finder` (:class:" -"`~importlib.machinery.PathFinder`), searches an :term:`import path`, which " -"contains a list of :term:`path entries `. Each path entry names " -"a location to search for modules." +"finders. One of these, called the :term:`path based finder` " +"(:class:`~importlib.machinery.PathFinder`), searches an :term:`import path`, " +"which contains a list of :term:`path entries `. Each path entry " +"names a location to search for modules." msgstr "" "Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς " -"προεπιλεγμένους meta path finders. Ένας από αυτούς, που ονομάζεται :term:" -"`path based finder` (:class:`~importlib.machinery.PathFinder`), αναζητά σε " -"ένα :term:`import path`, το οποίο περιέχει μια λίστα από :term:`path entries " -"`. Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν " -"modules." +"προεπιλεγμένους meta path finders. Ένας από αυτούς, που " +"ονομάζεται :term:`path based finder` " +"(:class:`~importlib.machinery.PathFinder`), αναζητά σε ένα :term:`import " +"path`, το οποίο περιέχει μια λίστα από :term:`path entries `. " +"Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν modules." #: reference/import.rst:647 msgid "" @@ -1354,16 +1362,16 @@ msgid "" "The default set of path entry finders implement all the semantics for " "finding modules on the file system, handling special file types such as " "Python source code (``.py`` files), Python byte code (``.pyc`` files) and " -"shared libraries (e.g. ``.so`` files). When supported by the :mod:" -"`zipimport` module in the standard library, the default path entry finders " -"also handle loading all of these file types (other than shared libraries) " -"from zipfiles." +"shared libraries (e.g. ``.so`` files). When supported by " +"the :mod:`zipimport` module in the standard library, the default path entry " +"finders also handle loading all of these file types (other than shared " +"libraries) from zipfiles." msgstr "" "Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη " "σημασιολογία για την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο " "ειδικούς τύπους αρχείων όπως πηγαίο κώδικα Python (αρχεία ``.py``), byte " -"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``." -"so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " +"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία " +"``.so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " "βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης διαδρομής χειρίζονται " "επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από κοινόχρηστες " "βιβλιοθήκες) από zipfiles." @@ -1401,8 +1409,8 @@ msgstr "" #: reference/import.rst:670 msgid "" "A word of warning: this section and the previous both use the term *finder*, " -"distinguishing between them by using the terms :term:`meta path finder` and :" -"term:`path entry finder`. These two types of finders are very similar, " +"distinguishing between them by using the terms :term:`meta path finder` " +"and :term:`path entry finder`. These two types of finders are very similar, " "support similar protocols, and function in similar ways during the import " "process, but it's important to keep in mind that they are subtly different. " "In particular, meta path finders operate at the beginning of the import " @@ -1414,8 +1422,8 @@ msgstr "" "παρόμοιοι, υποστηρίζουν παρόμοια πρωτόκολλα και λειτουργούν με παρόμοιο " "τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι σημαντικό να θυμάστε ότι " "έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders λειτουργούν στην " -"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση του :data:" -"`sys.meta_path`." +"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση " +"του :data:`sys.meta_path`." #: reference/import.rst:678 msgid "" @@ -1448,29 +1456,30 @@ msgstr "" #: reference/import.rst:698 msgid "" -"As a meta path finder, the :term:`path based finder` implements the :meth:" -"`~importlib.abc.MetaPathFinder.find_spec` protocol previously described, " -"however it exposes additional hooks that can be used to customize how " -"modules are found and loaded from the :term:`import path`." +"As a meta path finder, the :term:`path based finder` implements " +"the :meth:`~importlib.abc.MetaPathFinder.find_spec` protocol previously " +"described, however it exposes additional hooks that can be used to customize " +"how modules are found and loaded from the :term:`import path`." msgstr "" -"Ως meta path finder, ο :term:`path based finder` υλοποιεί το πρωτόκολλο :" -"meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε προηγουμένως, " -"ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " -"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import " -"path`." +"Ως meta path finder, ο :term:`path based finder` υλοποιεί το " +"πρωτόκολλο :meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε " +"προηγουμένως, ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν " +"για να προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από " +"το :term:`import path`." #: reference/import.rst:703 msgid "" -"Three variables are used by the :term:`path based finder`, :data:`sys." -"path`, :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " -"``__path__`` attributes on package objects are also used. These provide " -"additional ways that the import machinery can be customized." +"Three variables are used by the :term:`path based " +"finder`, :data:`sys.path`, :data:`sys.path_hooks` " +"and :data:`sys.path_importer_cache`. The ``__path__`` attributes on package " +"objects are also used. These provide additional ways that the import " +"machinery can be customized." msgstr "" -"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based finder`: :data:" -"`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " -"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα " -"πακέτου. Αυτά παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού " -"εισαγωγής." +"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based " +"finder`: :data:`sys.path`, :data:`sys.path_hooks` " +"και :data:`sys.path_importer_cache`. Επίσης χρησιμοποιούνται τα " +"χαρακτηριστικά ``__path__`` σε αντικείμενα πακέτου. Αυτά παρέχουν επιπλέον " +"τρόπους παραμετροποίησης του μηχανισμού εισαγωγής." #: reference/import.rst:708 msgid "" @@ -1478,10 +1487,10 @@ msgid "" "modules and packages. It is initialized from the :envvar:`PYTHONPATH` " "environment variable and various other installation- and implementation-" "specific defaults. Entries in :data:`sys.path` can name directories on the " -"file system, zip files, and potentially other \"locations\" (see the :mod:" -"`site` module) that should be searched for modules, such as URLs, or " -"database queries. Only strings should be present on :data:`sys.path`; all " -"other data types are ignored." +"file system, zip files, and potentially other \"locations\" (see " +"the :mod:`site` module) that should be searched for modules, such as URLs, " +"or database queries. Only strings should be present on :data:`sys.path`; " +"all other data types are ignored." msgstr "" "Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν " "τοποθεσίες αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη " @@ -1498,18 +1507,18 @@ msgid "" "The :term:`path based finder` is a :term:`meta path finder`, so the import " "machinery begins the :term:`import path` search by calling the path based " "finder's :meth:`~importlib.machinery.PathFinder.find_spec` method as " -"described previously. When the ``path`` argument to :meth:`~importlib." -"machinery.PathFinder.find_spec` is given, it will be a list of string paths " -"to traverse - typically a package's ``__path__`` attribute for an import " -"within that package. If the ``path`` argument is ``None``, this indicates a " -"top level import and :data:`sys.path` is used." +"described previously. When the ``path`` argument " +"to :meth:`~importlib.machinery.PathFinder.find_spec` is given, it will be a " +"list of string paths to traverse - typically a package's ``__path__`` " +"attribute for an import within that package. If the ``path`` argument is " +"``None``, this indicates a top level import and :data:`sys.path` is used." msgstr "" "Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο " "μηχανισμός εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας " "τη μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based " -"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` στη :" -"meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα " -"από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " +"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` " +"στη :meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια " +"λίστα από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " "``__path__`` ενός πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το " "όρισμα ``path`` είναι ``None``, αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου " "και χρησιμοποιείται το :data:`sys.path`." @@ -1517,17 +1526,17 @@ msgstr "" #: reference/import.rst:726 msgid "" "The path based finder iterates over every entry in the search path, and for " -"each of these, looks for an appropriate :term:`path entry finder` (:class:" -"`~importlib.abc.PathEntryFinder`) for the path entry. Because this can be " -"an expensive operation (e.g. there may be ``stat()`` call overheads for this " -"search), the path based finder maintains a cache mapping path entries to " -"path entry finders. This cache is maintained in :data:`sys." -"path_importer_cache` (despite the name, this cache actually stores finder " -"objects rather than being limited to :term:`importer` objects). In this way, " -"the expensive search for a particular :term:`path entry` location's :term:" -"`path entry finder` need only be done once. User code is free to remove " -"cache entries from :data:`sys.path_importer_cache` forcing the path based " -"finder to perform the path entry search again." +"each of these, looks for an appropriate :term:`path entry finder` " +"(:class:`~importlib.abc.PathEntryFinder`) for the path entry. Because this " +"can be an expensive operation (e.g. there may be ``stat()`` call overheads " +"for this search), the path based finder maintains a cache mapping path " +"entries to path entry finders. This cache is maintained " +"in :data:`sys.path_importer_cache` (despite the name, this cache actually " +"stores finder objects rather than being limited to :term:`importer` " +"objects). In this way, the expensive search for a particular :term:`path " +"entry` location's :term:`path entry finder` need only be done once. User " +"code is free to remove cache entries from :data:`sys.path_importer_cache` " +"forcing the path based finder to perform the path entry search again." msgstr "" "Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή " "αναζήτησης και, για καθεμία, αναζητά έναν κατάλληλο :term:`path entry " @@ -1540,20 +1549,20 @@ msgstr "" "προσωρινή μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` " "αντικείμενα). Με αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path " "entry` finder μιας συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία " -"φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από το :data:`sys." -"path_importer_cache`, αναγκάζοντας τον path based finder να εκτελέσει ξανά " -"την αναζήτηση." +"φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από " +"το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based finder να " +"εκτελέσει ξανά την αναζήτηση." #: reference/import.rst:739 msgid "" "If the path entry is not present in the cache, the path based finder " -"iterates over every callable in :data:`sys.path_hooks`. Each of the :term:" -"`path entry hooks ` in this list is called with a single " -"argument, the path entry to be searched. This callable may either return a :" -"term:`path entry finder` that can handle the path entry, or it may raise :" -"exc:`ImportError`. An :exc:`ImportError` is used by the path based finder " -"to signal that the hook cannot find a :term:`path entry finder` for that :" -"term:`path entry`. The exception is ignored and :term:`import path` " +"iterates over every callable in :data:`sys.path_hooks`. Each of " +"the :term:`path entry hooks ` in this list is called with a " +"single argument, the path entry to be searched. This callable may either " +"return a :term:`path entry finder` that can handle the path entry, or it may " +"raise :exc:`ImportError`. An :exc:`ImportError` is used by the path based " +"finder to signal that the hook cannot find a :term:`path entry finder` for " +"that :term:`path entry`. The exception is ignored and :term:`import path` " "iteration continues. The hook should expect either a string or bytes " "object; the encoding of bytes objects is up to the hook (e.g. it may be a " "file system encoding, UTF-8, or something else), and if the hook cannot " @@ -1564,9 +1573,9 @@ msgstr "" "Κάθε :term:`path entry hook ` σε αυτή τη λίστα καλείται με " "ένα μόνο όρισμα: την καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το " "callable μπορεί είτε να επιστρέψει έναν :term:`path entry finder` που μπορεί " -"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise ένα :exc:" -"`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path based " -"finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " +"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise " +"ένα :exc:`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path " +"based finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " "finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η " "επανάληψη στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει " "είτε συμβολοσειρά είτε αντικείμενο bytes· η κωδικοποίηση των bytes " @@ -1577,18 +1586,19 @@ msgstr "" #: reference/import.rst:753 msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " -"being returned, then the path based finder's :meth:`~importlib.machinery." -"PathFinder.find_spec` method will store ``None`` in :data:`sys." -"path_importer_cache` (to indicate that there is no finder for this path " -"entry) and return ``None``, indicating that this :term:`meta path finder` " -"could not find the module." -msgstr "" -"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :" -"term:`path entry finder`, τότε η μέθοδος :meth:`~importlib.machinery." -"PathFinder.find_spec` του path based finder θα αποθηκεύσει ``None`` στο :" -"data:`sys.path_importer_cache` (για να δηλώσει ότι δεν υπάρχει finder για " -"αυτή την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " -"αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." +"being returned, then the path based " +"finder's :meth:`~importlib.machinery.PathFinder.find_spec` method will store " +"``None`` in :data:`sys.path_importer_cache` (to indicate that there is no " +"finder for this path entry) and return ``None``, indicating that " +"this :term:`meta path finder` could not find the module." +msgstr "" +"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να " +"επιστραφεί :term:`path entry finder`, τότε η " +"μέθοδος :meth:`~importlib.machinery.PathFinder.find_spec` του path based " +"finder θα αποθηκεύσει ``None`` στο :data:`sys.path_importer_cache` (για να " +"δηλώσει ότι δεν υπάρχει finder για αυτή την καταχώρηση διαδρομής) και θα " +"επιστρέψει ``None``, δηλώνοντας ότι αυτός ο :term:`meta path finder` δεν " +"μπόρεσε να βρει το module." #: reference/import.rst:760 msgid "" @@ -1609,19 +1619,19 @@ msgid "" "current working directory cannot be determined or is found not to exist, no " "value is stored in :data:`sys.path_importer_cache`. Second, the value for " "the current working directory is looked up fresh for each module lookup. " -"Third, the path used for :data:`sys.path_importer_cache` and returned by :" -"meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " -"working directory and not the empty string." +"Third, the path used for :data:`sys.path_importer_cache` and returned " +"by :meth:`importlib.machinery.PathFinder.find_spec` will be the actual " +"current working directory and not the empty string." msgstr "" "Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- " -"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys." -"path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν διαπιστωθεί ότι δεν " -"υπάρχει, δεν αποθηκεύεται τιμή στο :data:`sys.path_importer_cache`. " -"Δεύτερον, η τιμή για τον τρέχοντα κατάλογο εργασίας αναζητείται εκ νέου για " -"κάθε αναζήτηση module. Τρίτον, η διαδρομή που χρησιμοποιείται για το :data:" -"`sys.path_importer_cache` και επιστρέφεται από τη :meth:`importlib.machinery." -"PathFinder.find_spec` θα είναι ο πραγματικός τρέχων κατάλογος εργασίας και " -"όχι η κενή συμβολοσειρά." +"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές " +"στο :data:`sys.path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν " +"διαπιστωθεί ότι δεν υπάρχει, δεν αποθηκεύεται τιμή " +"στο :data:`sys.path_importer_cache`. Δεύτερον, η τιμή για τον τρέχοντα " +"κατάλογο εργασίας αναζητείται εκ νέου για κάθε αναζήτηση module. Τρίτον, η " +"διαδρομή που χρησιμοποιείται για το :data:`sys.path_importer_cache` και " +"επιστρέφεται από τη :meth:`importlib.machinery.PathFinder.find_spec` θα " +"είναι ο πραγματικός τρέχων κατάλογος εργασίας και όχι η κενή συμβολοσειρά." #: reference/import.rst:775 msgid "Path entry finder protocol" @@ -1635,8 +1645,8 @@ msgid "" msgstr "" "Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, " "καθώς και για τη συνεισφορά portions σε namespace πακέτα, οι path entry " -"finders πρέπει να υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder." -"find_spec`." +"finders πρέπει να υλοποιούν τη " +"μέθοδο :meth:`~importlib.abc.PathEntryFinder.find_spec`." #: reference/import.rst:781 msgid "" @@ -1653,9 +1663,9 @@ msgstr "" #: reference/import.rst:786 msgid "" -"To indicate to the import machinery that the spec represents a namespace :" -"term:`portion`, the path entry finder sets ``submodule_search_locations`` to " -"a list containing the portion." +"To indicate to the import machinery that the spec represents a " +"namespace :term:`portion`, the path entry finder sets " +"``submodule_search_locations`` to a list containing the portion." msgstr "" "Για να δηλώσει στον μηχανισμό εισαγωγής ότι το spec αναπαριστά ένα " "namespace :term:`portion`, ο path entry finder ορίζει το " @@ -1692,8 +1702,8 @@ msgid "" msgstr "" "Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του " "module που εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο " -"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα namespace :term:" -"`portion`." +"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα " +"namespace :term:`portion`." #: reference/import.rst:806 msgid "" @@ -1748,9 +1758,9 @@ msgid "" "entirely with a custom meta path hook." msgstr "" "Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος " -"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys." -"meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-" -"διαδρομής." +"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων " +"του :data:`sys.meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο " +"hook μετά-διαδρομής." #: reference/import.rst:835 msgid "" @@ -1770,10 +1780,10 @@ msgstr "" msgid "" "To selectively prevent the import of some modules from a hook early on the " "meta path (rather than disabling the standard import system entirely), it is " -"sufficient to raise :exc:`ModuleNotFoundError` directly from :meth:" -"`~importlib.abc.MetaPathFinder.find_spec` instead of returning ``None``. The " -"latter indicates that the meta path search should continue, while raising an " -"exception terminates it immediately." +"sufficient to raise :exc:`ModuleNotFoundError` directly " +"from :meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning " +"``None``. The latter indicates that the meta path search should continue, " +"while raising an exception terminates it immediately." msgstr "" "Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook " "νωρίς στη μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα " @@ -1866,8 +1876,8 @@ msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" -"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το ." -"moduleY δεν είναι έγκυρη έκφραση." +"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά " +"το .moduleY δεν είναι έγκυρη έκφραση." #: reference/import.rst:892 msgid "Special considerations for __main__" @@ -1877,9 +1887,9 @@ msgstr "Ειδικές περιπτώσεις για το __main__" msgid "" "The :mod:`__main__` module is a special case relative to Python's import " "system. As noted :ref:`elsewhere `, the ``__main__`` module is " -"directly initialized at interpreter startup, much like :mod:`sys` and :mod:" -"`builtins`. However, unlike those two, it doesn't strictly qualify as a " -"built-in module. This is because the manner in which ``__main__`` is " +"directly initialized at interpreter startup, much like :mod:`sys` " +"and :mod:`builtins`. However, unlike those two, it doesn't strictly qualify " +"as a built-in module. This is because the manner in which ``__main__`` is " "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" @@ -1900,8 +1910,8 @@ msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" -"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__." -"__spec__`` ορίζεται κατάλληλα ή σε ``None``." +"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το " +"``__main__.__spec__`` ορίζεται κατάλληλα ή σε ``None``." #: reference/import.rst:910 msgid "" @@ -1917,13 +1927,14 @@ msgstr "" #: reference/import.rst:915 msgid "" -"In :ref:`the remaining cases ` ``__main__." -"__spec__`` is set to ``None``, as the code used to populate the :mod:" -"`__main__` does not correspond directly with an importable module:" +"In :ref:`the remaining cases ` " +"``__main__.__spec__`` is set to ``None``, as the code used to populate " +"the :mod:`__main__` does not correspond directly with an importable module:" msgstr "" -"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__." -"__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να " -"γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" +"Στις :ref:`υπόλοιπες περιπτώσεις ` το " +"``__main__.__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που " +"χρησιμοποιείται για να γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε " +"εισαγόμενο module:" #: reference/import.rst:919 msgid "interactive prompt" @@ -1945,8 +1956,8 @@ msgstr "εκτέλεση απευθείας από το αρχείο πηγαί msgid "" "Note that ``__main__.__spec__`` is always ``None`` in the last case, *even " "if* the file could technically be imported directly as a module instead. Use " -"the :option:`-m` switch if valid module metadata is desired in :mod:" -"`__main__`." +"the :option:`-m` switch if valid module metadata is desired " +"in :mod:`__main__`." msgstr "" "Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα " "``None``, *ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας " @@ -2049,17 +2060,19 @@ msgstr "Δείτε την :class:`types.ModuleType`." #: reference/import.rst:970 msgid "" "The importlib implementation avoids using the return value directly. " -"Instead, it gets the module object by looking the module name up in :data:" -"`sys.modules`. The indirect effect of this is that an imported module may " -"replace itself in :data:`sys.modules`. This is implementation-specific " -"behavior that is not guaranteed to work in other Python implementations." +"Instead, it gets the module object by looking the module name up " +"in :data:`sys.modules`. The indirect effect of this is that an imported " +"module may replace itself in :data:`sys.modules`. This is implementation-" +"specific behavior that is not guaranteed to work in other Python " +"implementations." msgstr "" "Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή " "επιστροφής. Αντ’ αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα " "του module στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα " -"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του στο :data:`sys." -"modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης υλοποίησης και " -"δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της Python." +"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του " +"στο :data:`sys.modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης " +"υλοποίησης και δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της " +"Python." #: reference/import.rst:8 msgid "import machinery" From ae68dd9ea224fe5a3ef16a271d25394f848da7d5 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 17:26:13 +0200 Subject: [PATCH 10/17] Add powrap changes --- dictionaries/main.txt | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 3af03d64..a31700ba 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -167,6 +167,7 @@ Korn Krah L Laboratories +Launch Letter Libraries Library @@ -268,6 +269,7 @@ Redistribution Redistributions Reference Reilly +Reprs Research Resources Reston @@ -418,8 +420,10 @@ asyncio at attribute attributes +attrs audit auditing +automatically available average await @@ -493,6 +497,7 @@ bzip c cache cached +caches call callable callables @@ -523,6 +528,7 @@ char character charge chdir +checked choice chomp chr @@ -698,6 +704,7 @@ endianness endorse enter entities +entries entry enum env @@ -849,6 +856,7 @@ historic holder home hook +hooks host hot however @@ -866,6 +874,7 @@ implement implementation import importer +importers importing importlib imports @@ -958,6 +967,7 @@ l lang last lasti +launcher lazy le leading @@ -1069,8 +1079,10 @@ mode modification modify module +moduleY modules modulo +monkey most mro ms @@ -1141,6 +1153,7 @@ orange ordinal ordinals org +origin os other others @@ -1149,6 +1162,7 @@ out over overallocation overalpping +overhead overlap pack package @@ -1205,6 +1219,7 @@ pop popen popleft population +portion portions pos positional @@ -1391,6 +1406,10 @@ spaces spam spamspam spec +specifically +specifier +specifiers +specs speed split splitlines @@ -1436,6 +1455,8 @@ subject sublicense submodule submodules +subpackage +subpackages subroutine subroutines subscript @@ -1544,6 +1565,7 @@ un uname unary uncased +unchecked uncomp undecorated underscore @@ -1641,6 +1663,8 @@ yvec z zip zipapp +zipfile +zipfiles zlib zoneinfo Αν @@ -1772,6 +1796,7 @@ zoneinfo δηλ διάφoρα διαγραφέα +διακρίνοντάς διακόπηκε διαλέκτου διαλειτουργήσει @@ -1807,6 +1832,7 @@ zoneinfo ενδοκλάσεων ενσωματωτές ενσωματώσιμες +εντοπίσιμο εντοπιστές εντοπιστή εξαδικού @@ -1820,6 +1846,8 @@ zoneinfo επαναλήψιμους επαναληπτές επαναληπτή +επαναρχικοποιήσει +επαναφόρτωση επαναχρησιμοποιήσετε επαναχρησιμοποιηθούν επανεγκατασήστε @@ -1900,6 +1928,7 @@ zoneinfo μεταβλητών μεταδεδομένα μεταδεδομένων +μεταδιαδρομή μετακλάσεις μετακλάσεων μετακλάση @@ -2002,6 +2031,7 @@ zoneinfo προσεταιριστικός προσημασμένος προσπελαύνεται +προσπελαύνουν προσποιηθείτε προτάσσοντάς ρήτρων @@ -2106,39 +2136,9 @@ zoneinfo χρονοσφραγίδα ψήφια ψευδο +ψευδοκώδικα ψευδοτυχαία ψευδοτυχαίες ψευδοτυχαίων ό ότι -subpackages -subpackage -portion -επαναρχικοποιήσει -importers -εντοπίσιμο -specs -hooks -επαναφόρτωση -attrs -ψευδοκώδικα -Reprs -origin -checked -unchecked -caches -zipfiles -διακρίνοντάς -entries -overhead -προσπελαύνουν -μεταδιαδρομή -moduleY -zipfile -launcher -specifier -monkey -Launch -specifically -automatically -specifiers From 794aecab3414e146445d69e8ce9ac617f9a99075 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 17:45:53 +0200 Subject: [PATCH 11/17] Fix translation --- reference/import.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/import.po b/reference/import.po index c2eb9fb0..12e86eaf 100644 --- a/reference/import.po +++ b/reference/import.po @@ -1123,7 +1123,7 @@ msgid "" msgstr "" "Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " "του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται " -"κατά την εκκίνηση των του διερμηνέα`. Η μόνη εξαίρεση είναι το " +"κατά την εκκίνηση του διερμηνέα `. Η μόνη εξαίρεση είναι το " "``__main__``, όπου το :attr:`!__spec__` :ref:`τίθεται σε None σε ορισμένες " "περιπτώσεις `." From 8b9188b7807a66b44b054f2fd276b9857649938e Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 17:53:12 +0200 Subject: [PATCH 12/17] Fix translation --- reference/import.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/import.po b/reference/import.po index 12e86eaf..dd9456d9 100644 --- a/reference/import.po +++ b/reference/import.po @@ -1548,7 +1548,7 @@ msgstr "" "διατηρείται στο :data:`sys.path_importer_cache` (παρά το όνομα, αυτή η " "προσωρινή μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` " "αντικείμενα). Με αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path " -"entry` finder μιας συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία " +"entry finder` μιας συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία " "φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από " "το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based finder να " "εκτελέσει ξανά την αναζήτηση." From 19ea1bddf247e5d49d7a797cc138e15adb982401 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:59:02 +0000 Subject: [PATCH 13/17] [pre-commit.ci lite] apply automatic fixes --- reference/import.po | 671 ++++++++++++++++++++++---------------------- 1 file changed, 329 insertions(+), 342 deletions(-) diff --git a/reference/import.po b/reference/import.po index dd9456d9..7c4fcdc1 100644 --- a/reference/import.po +++ b/reference/import.po @@ -26,16 +26,15 @@ msgid "" "Python code in one :term:`module` gains access to the code in another module " "by the process of :term:`importing` it. The :keyword:`import` statement is " "the most common way of invoking the import machinery, but it is not the only " -"way. Functions such as :func:`importlib.import_module` and built-" -"in :func:`__import__` can also be used to invoke the import machinery." +"way. Functions such as :func:`importlib.import_module` and built-in :func:" +"`__import__` can also be used to invoke the import machinery." msgstr "" "Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός " -"άλλου module μέσω της διαδικασίας του :term:`importing`. Η " -"δήλωση :keyword:`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του " -"μηχανισμού import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως " -"η :func:`importlib.import_module` και η ενσωματωμένη :func:`__import__` " -"μπορούν επίσης να χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού " -"εισαγωγής." +"άλλου module μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:" +"`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού " +"import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως η :func:`importlib." +"import_module` και η ενσωματωμένη :func:`__import__` μπορούν επίσης να " +"χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού εισαγωγής." #: reference/import.rst:16 msgid "" @@ -44,19 +43,18 @@ msgid "" "local scope. The search operation of the :keyword:`!import` statement is " "defined as a call to the :func:`__import__` function, with the appropriate " "arguments. The return value of :func:`__import__` is used to perform the " -"name binding operation of the :keyword:`!import` statement. See " -"the :keyword:`!import` statement for the exact details of that name binding " +"name binding operation of the :keyword:`!import` statement. See the :" +"keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" "Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με " "το συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της " "αναζήτησης σε ένα όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της " -"δήλωσης :keyword:`!import` ορίζεται ως κλήση της " -"συνάρτησης :func:`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής " -"της :func:`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία " -"δέσμευσης ονόματος της δήλωσης :keyword:`!import`. Δείτε τη " -"δήλωση :keyword:`!import` για τις ακριβείς λεπτομέρειες αυτής της " -"λειτουργίας." +"δήλωσης :keyword:`!import` ορίζεται ως κλήση της συνάρτησης :func:" +"`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής της :func:" +"`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " +"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` " +"για τις ακριβείς λεπτομέρειες αυτής της λειτουργίας." #: reference/import.rst:25 msgid "" @@ -74,11 +72,10 @@ msgstr "" #: reference/import.rst:31 msgid "" -"When an :keyword:`import` statement is executed, the standard " -"builtin :func:`__import__` function is called. Other mechanisms for invoking " -"the import system (such as :func:`importlib.import_module`) may choose to " -"bypass :func:`__import__` and use their own solutions to implement import " -"semantics." +"When an :keyword:`import` statement is executed, the standard builtin :func:" +"`__import__` function is called. Other mechanisms for invoking the import " +"system (such as :func:`importlib.import_module`) may choose to bypass :func:" +"`__import__` and use their own solutions to implement import semantics." msgstr "" "Όταν εκτελείται μια δήλωση :keyword:`import`, καλείται η τυπική ενσωματωμένη " "συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος " @@ -97,24 +94,24 @@ msgid "" msgstr "" "Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το " "βρει, δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το " -"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η " -"εξαίρεση :exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές " -"αναζήτησης για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές " -"οι στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων " -"hooks που περιγράφονται στις παρακάτω ενότητες." +"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η εξαίρεση :" +"exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " +"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι " +"στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks " +"που περιγράφονται στις παρακάτω ενότητες." #: reference/import.rst:43 msgid "" -"The import system has been updated to fully implement the second phase " -"of :pep:`302`. There is no longer any implicit import machinery - the full " +"The import system has been updated to fully implement the second phase of :" +"pep:`302`. There is no longer any implicit import machinery - the full " "import system is exposed through :data:`sys.meta_path`. In addition, native " "namespace package support has been implemented (see :pep:`420`)." msgstr "" "Το σύστημα εισαγωγής έχει ενημερωθεί ώστε να υλοποιεί πλήρως τη δεύτερη φάση " "του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο " "πλήρης μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. " -"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages " -"(βλ. :pep:`420`)." +"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages (βλ. :" +"pep:`420`)." #: reference/import.rst:51 msgid ":mod:`importlib`" @@ -193,8 +190,8 @@ msgstr "" "το όνομα του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη " "πρόσβασης σε χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package " "με όνομα :mod:`email`, το οποίο με τη σειρά του έχει ένα subpackage με " -"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με " -"όνομα :mod:`email.mime.text`." +"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με όνομα :" +"mod:`email.mime.text`." #: reference/import.rst:93 msgid "Regular packages" @@ -206,11 +203,11 @@ msgid "" "package>` and :term:`namespace packages `. Regular " "packages are traditional packages as they existed in Python 3.2 and earlier. " "A regular package is typically implemented as a directory containing an " -"``__init__.py`` file. When a regular package is imported, this " -"``__init__.py`` file is implicitly executed, and the objects it defines are " -"bound to names in the package's namespace. The ``__init__.py`` file can " -"contain the same Python code that any other module can contain, and Python " -"will add some additional attributes to the module when it is imported." +"``__init__.py`` file. When a regular package is imported, this ``__init__." +"py`` file is implicitly executed, and the objects it defines are bound to " +"names in the package's namespace. The ``__init__.py`` file can contain the " +"same Python code that any other module can contain, and Python will add some " +"additional attributes to the module when it is imported." msgstr "" "Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και τα :term:`namespace packages `. Τα regular " @@ -338,24 +335,24 @@ msgstr "" "Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως " "αναγνωρισμένο ` όνομα του module (ή του πακέτου, αλλά για " "τους σκοπούς αυτής της συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. " -"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της " -"δήλωσης :keyword:`import` ή από τις παραμέτρους των " -"συναρτήσεων :func:`importlib.import_module` ή :func:`__import__`." +"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της δήλωσης :keyword:" +"`import` ή από τις παραμέτρους των συναρτήσεων :func:`importlib." +"import_module` ή :func:`__import__`." #: reference/import.rst:168 msgid "" "This name will be used in various phases of the import search, and it may be " "the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python " -"first tries to import ``foo``, then ``foo.bar``, and finally " -"``foo.bar.baz``. If any of the intermediate imports fail, " -"a :exc:`ModuleNotFoundError` is raised." +"first tries to import ``foo``, then ``foo.bar``, and finally ``foo.bar." +"baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " +"is raised." msgstr "" "Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και " -"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. " -"``foo.bar.baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει " -"το ``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " -"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise " -"η :exc:`ModuleNotFoundError`." +"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar." +"baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει το " +"``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " +"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise η :exc:" +"`ModuleNotFoundError`." #: reference/import.rst:175 msgid "The module cache" @@ -370,21 +367,20 @@ msgid "" "and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" -"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι " -"το :data:`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη " -"όλων των modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των " -"ενδιάμεσων διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί " -"προηγουμένως, το :data:`sys.modules` θα περιέχει εγγραφές για τα ``foo``, " -"``foo.bar`` και ``foo.bar.baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο " -"αντικείμενο module." +"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:" +"`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " +"modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων " +"διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί προηγουμένως, το :data:" +"`sys.modules` θα περιέχει εγγραφές για τα ``foo``, ``foo.bar`` και ``foo.bar." +"baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο module." #: reference/import.rst:187 msgid "" "During import, the module name is looked up in :data:`sys.modules` and if " "present, the associated value is the module satisfying the import, and the " -"process completes. However, if the value is ``None``, then " -"a :exc:`ModuleNotFoundError` is raised. If the module name is missing, " -"Python will continue searching for the module." +"process completes. However, if the value is ``None``, then a :exc:" +"`ModuleNotFoundError` is raised. If the module name is missing, Python will " +"continue searching for the module." msgstr "" "Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` " "και, αν υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την " @@ -398,24 +394,24 @@ msgid "" "associated module (as other modules may hold references to it), but it will " "invalidate the cache entry for the named module, causing Python to search " "anew for the named module upon its next import. The key can also be assigned " -"to ``None``, forcing the next import of the module to result in " -"a :exc:`ModuleNotFoundError`." +"to ``None``, forcing the next import of the module to result in a :exc:" +"`ModuleNotFoundError`." msgstr "" "Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να " "μην καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν " "αναφορές σε αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το " "module με το συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει " "ξανά στην επόμενο εισαγωγή. Το κλειδί μπορεί επίσης να οριστεί σε ``None``, " -"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει " -"σε :exc:`ModuleNotFoundError`." +"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει σε :exc:" +"`ModuleNotFoundError`." #: reference/import.rst:200 msgid "" "Beware though, as if you keep a reference to the module object, invalidate " "its cache entry in :data:`sys.modules`, and then re-import the named module, " -"the two module objects will *not* be the same. By " -"contrast, :func:`importlib.reload` will reuse the *same* module object, and " -"simply reinitialise the module contents by rerunning the module's code." +"the two module objects will *not* be the same. By contrast, :func:`importlib." +"reload` will reuse the *same* module object, and simply reinitialise the " +"module contents by rerunning the module's code." msgstr "" "Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την " "εγγραφή του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε " @@ -432,12 +428,12 @@ msgstr "Finders και loaders" msgid "" "If the named module is not found in :data:`sys.modules`, then Python's " "import protocol is invoked to find and load the module. This protocol " -"consists of two conceptual objects, :term:`finders ` " -"and :term:`loaders `. A finder's job is to determine whether it can " -"find the named module using whatever strategy it knows about. Objects that " -"implement both of these interfaces are referred to as :term:`importers " -"` - they return themselves when they find that they can load the " -"requested module." +"consists of two conceptual objects, :term:`finders ` and :term:" +"`loaders `. A finder's job is to determine whether it can find the " +"named module using whatever strategy it knows about. Objects that implement " +"both of these interfaces are referred to as :term:`importers ` - " +"they return themselves when they find that they can load the requested " +"module." msgstr "" "Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "τότε ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να " @@ -504,10 +500,10 @@ msgid "" "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" -"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν " -"απευθείας :term:`loaders `, ενώ τώρα επιστρέφουν module specs που " -"*περιέχουν* loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την " -"εισαγωγή, αλλά έχουν λιγότερες ευθύνες." +"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:" +"`loaders `, ενώ τώρα επιστρέφουν module specs που *περιέχουν* " +"loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά " +"έχουν λιγότερες ευθύνες." #: reference/import.rst:249 msgid "Import hooks" @@ -540,16 +536,15 @@ msgstr "" #: reference/import.rst:269 msgid "" -"Import path hooks are called as part of :data:`sys.path` (or " -"``package.__path__``) processing, at the point where their associated path " -"item is encountered. Import path hooks are registered by adding new " -"callables to :data:`sys.path_hooks` as described below." +"Import path hooks are called as part of :data:`sys.path` (or ``package." +"__path__``) processing, at the point where their associated path item is " +"encountered. Import path hooks are registered by adding new callables to :" +"data:`sys.path_hooks` as described below." msgstr "" -"Τα import path hooks καλούνται ως μέρος της επεξεργασίας " -"του :data:`sys.path` (ή του ``package.__path__``), στο σημείο όπου " -"συναντάται το αντίστοιχο στοιχείο διαδρομής. Τα import path hooks " -"καταχωρίζονται προσθέτοντας νέα callables στο :data:`sys.path_hooks`, όπως " -"περιγράφεται παρακάτω." +"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys." +"path` (ή του ``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο " +"στοιχείο διαδρομής. Τα import path hooks καταχωρίζονται προσθέτοντας νέα " +"callables στο :data:`sys.path_hooks`, όπως περιγράφεται παρακάτω." #: reference/import.rst:276 msgid "The meta path" @@ -560,21 +555,21 @@ msgid "" "When the named module is not found in :data:`sys.modules`, Python next " "searches :data:`sys.meta_path`, which contains a list of meta path finder " "objects. These finders are queried in order to see if they know how to " -"handle the named module. Meta path finders must implement a method " -"called :meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three " -"arguments: a name, an import path, and (optionally) a target module. The " -"meta path finder can use any strategy it wants to determine whether it can " -"handle the named module or not." +"handle the named module. Meta path finders must implement a method called :" +"meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments: " +"a name, an import path, and (optionally) a target module. The meta path " +"finder can use any strategy it wants to determine whether it can handle the " +"named module or not." msgstr "" "Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "η Python στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο " "περιέχει μια λίστα από meta path finder αντικείμενα. Αυτοί οι finders " "ερωτώνται με τη σειρά για να διαπιστωθεί αν γνωρίζουν πώς να χειριστούν το " -"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με " -"όνομα :meth:`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία " -"ορίσματα: ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο " -"meta path finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για " -"να καθορίσει αν μπορεί να χειριστεί το module ή όχι." +"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με όνομα :meth:" +"`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία ορίσματα: " +"ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " +"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να " +"καθορίσει αν μπορεί να χειριστεί το module ή όχι." #: reference/import.rst:291 msgid "" @@ -611,10 +606,10 @@ msgstr "" "την αναζήτηση του module. Για modules ανωτέρου επιπέδου, το δεύτερο όρισμα " "είναι ``None``, αλλά για submodules ή subpackages, είναι η τιμή του " "χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η " -"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise " -"το :exc:`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο " -"module που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα " -"εισαγωγής περνά target module μόνο κατά την επαναφόρτωση." +"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise το :exc:" +"`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο module " +"που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα εισαγωγής " +"περνά target module μόνο κατά την επαναφόρτωση." #: reference/import.rst:308 msgid "" @@ -623,21 +618,19 @@ msgid "" "importing ``foo.bar.baz`` will first perform a top level import, calling " "``mpf.find_spec(\"foo\", None, None)`` on each meta path finder (``mpf``). " "After ``foo`` has been imported, ``foo.bar`` will be imported by traversing " -"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", " -"foo.__path__, None)``. Once ``foo.bar`` has been imported, the final " -"traversal will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " -"None)``." +"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", foo." +"__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " +"will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." msgstr "" "Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα " "εισαγωγής. Για παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules " "δεν έχει ήδη προστεθεί στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` " -"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το " -"``mpf.find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). " -"Αφού εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta " -"path για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", " -"foo.__path__, None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική " -"διάσχιση θα καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " -"None)``." +"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το ``mpf." +"find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). Αφού " +"εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta path " +"για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " +"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα " +"καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." #: reference/import.rst:318 msgid "" @@ -667,30 +660,30 @@ msgid "" "The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path " "finders replaced :meth:`!find_module`, which is now deprecated. While it " "will continue to work without change, the import machinery will try it only " -"if the finder does not " -"implement :meth:`~importlib.abc.MetaPathFinder.find_spec`." +"if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." +"find_spec`." msgstr "" "Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path " "finders αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί " "ως απαρχαιωμένη. Αν και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο " -"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί " -"τη :meth:`~importlib.abc.MetaPathFinder.find_spec`." +"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί τη :meth:" +"`~importlib.abc.MetaPathFinder.find_spec`." #: reference/import.rst:334 msgid "" -"Use of :meth:`!find_module` by the import system now " -"raises :exc:`ImportWarning`." +"Use of :meth:`!find_module` by the import system now raises :exc:" +"`ImportWarning`." msgstr "" "Η χρήση της :meth:`!find_module` από το σύστημα εισαγωγής πλέον κάνει raise " "την :exc:`ImportWarning`." #: reference/import.rst:338 msgid "" -":meth:`!find_module` has been removed. " -"Use :meth:`~importlib.abc.MetaPathFinder.find_spec` instead." +":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." +"MetaPathFinder.find_spec` instead." msgstr "" -"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε " -"την :meth:`~importlib.abc.MetaPathFinder.find_spec` στη θέση της." +"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε την :meth:`~importlib." +"abc.MetaPathFinder.find_spec` στη θέση της." #: reference/import.rst:344 msgid "Loading" @@ -772,11 +765,11 @@ msgstr "Σημειώστε τις ακόλουθες λεπτομέρειες:" #: reference/import.rst:381 msgid "" -"If there is an existing module object with the given name " -"in :data:`sys.modules`, import will have already returned it." +"If there is an existing module object with the given name in :data:`sys." +"modules`, import will have already returned it." msgstr "" -"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα " -"στο :data:`sys.modules`, το import θα το έχει ήδη επιστρέψει." +"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:" +"`sys.modules`, το import θα το έχει ήδη επιστρέψει." #: reference/import.rst:384 msgid "" @@ -788,17 +781,17 @@ msgid "" msgstr "" "Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " "κώδικα του module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί " -"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του " -"στο :data:`sys.modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη " -"χειρότερη περίπτωση και πολλαπλή φόρτωση στην καλύτερη." +"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys." +"modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη χειρότερη περίπτωση " +"και πολλαπλή φόρτωση στην καλύτερη." #: reference/import.rst:390 msgid "" "If loading fails, the failing module -- and only the failing module -- gets " -"removed from :data:`sys.modules`. Any module already in " -"the :data:`sys.modules` cache, and any module that was successfully loaded " -"as a side-effect, must remain in the cache. This contrasts with reloading " -"where even the failing module is left in :data:`sys.modules`." +"removed from :data:`sys.modules`. Any module already in the :data:`sys." +"modules` cache, and any module that was successfully loaded as a side-" +"effect, must remain in the cache. This contrasts with reloading where even " +"the failing module is left in :data:`sys.modules`." msgstr "" "Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται " "από το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή " @@ -840,12 +833,12 @@ msgstr "" #: reference/import.rst:408 msgid "" "The import system has taken over the boilerplate responsibilities of " -"loaders. These were previously performed by " -"the :meth:`importlib.abc.Loader.load_module` method." +"loaders. These were previously performed by the :meth:`importlib.abc.Loader." +"load_module` method." msgstr "" "Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. " -"Αυτές εκτελούνταν παλαιότερα από τη " -"μέθοδο :meth:`importlib.abc.Loader.load_module`." +"Αυτές εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader." +"load_module`." #: reference/import.rst:414 msgid "Loaders" @@ -859,10 +852,10 @@ msgid "" "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" "Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση " -"του module. Ο μηχανισμός εισαγωγής καλεί τη " -"μέθοδο :meth:`importlib.abc.Loader.exec_module` με ένα μόνο όρισμα, το " -"αντικείμενο module που θα εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει " -"η :meth:`~importlib.abc.Loader.exec_module` αγνοείται." +"του module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc." +"Loader.exec_module` με ένα μόνο όρισμα, το αντικείμενο module που θα " +"εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει η :meth:`~importlib.abc.Loader." +"exec_module` αγνοείται." #: reference/import.rst:421 msgid "Loaders must satisfy the following requirements:" @@ -880,13 +873,13 @@ msgstr "" #: reference/import.rst:427 msgid "" -"If the loader cannot execute the module, it should raise " -"an :exc:`ImportError`, although any other exception raised " -"during :meth:`~importlib.abc.Loader.exec_module` will be propagated." +"If the loader cannot execute the module, it should raise an :exc:" +"`ImportError`, although any other exception raised during :meth:`~importlib." +"abc.Loader.exec_module` will be propagated." msgstr "" -"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise " -"το :exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά " -"τη :meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." +"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise το :" +"exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά τη :" +"meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." #: reference/import.rst:431 msgid "" @@ -895,9 +888,9 @@ msgid "" "a spec with the loader set to ``self``." msgstr "" "Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο " -"αντικείμενο· σε αυτές τις περιπτώσεις, η " -"μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` απλώς θα επιστρέψει " -"ένα spec με τον loader ορισμένο σε ``self``." +"αντικείμενο· σε αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc." +"MetaPathFinder.find_spec` απλώς θα επιστρέψει ένα spec με τον loader " +"ορισμένο σε ``self``." #: reference/import.rst:435 msgid "" @@ -909,12 +902,12 @@ msgid "" "will create the new module itself." msgstr "" "Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module " -"κατά τη φόρτωση υλοποιώντας μια " -"μέθοδο :meth:`~importlib.abc.Loader.create_module`. Παίρνει ένα όρισμα, το " -"module spec, και επιστρέφει το νέο αντικείμενο module που θα χρησιμοποιηθεί " -"κατά τη φόρτωση. Η ``create_module()`` δεν χρειάζεται να ορίσει " -"χαρακτηριστικά στο αντικείμενο module. Αν η μέθοδος επιστρέψει ``None``, ο " -"μηχανισμός εισαγωγής θα δημιουργήσει ο ίδιος το νέο module." +"κατά τη φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader." +"create_module`. Παίρνει ένα όρισμα, το module spec, και επιστρέφει το νέο " +"αντικείμενο module που θα χρησιμοποιηθεί κατά τη φόρτωση. Η " +"``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο αντικείμενο " +"module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " +"δημιουργήσει ο ίδιος το νέο module." #: reference/import.rst:442 msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." @@ -922,13 +915,13 @@ msgstr "Η μέθοδος :meth:`~importlib.abc.Loader.create_module` των loa #: reference/import.rst:445 msgid "" -"The :meth:`~importlib.abc.Loader.load_module` method was replaced " -"by :meth:`~importlib.abc.Loader.exec_module` and the import machinery " -"assumed all the boilerplate responsibilities of loading." +"The :meth:`~importlib.abc.Loader.load_module` method was replaced by :meth:" +"`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " +"boilerplate responsibilities of loading." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από " -"την :meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής " -"ανέλαβε όλες τις τυποποιημένες ευθύνες της φόρτωσης." +"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από την :" +"meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε " +"όλες τις τυποποιημένες ευθύνες της φόρτωσης." #: reference/import.rst:450 msgid "" @@ -954,16 +947,16 @@ msgstr "" #: reference/import.rst:459 msgid "" -"If there is an existing module object with the given name " -"in :data:`sys.modules`, the loader must use that existing module. " -"(Otherwise, :func:`importlib.reload` will not work correctly.) If the named " -"module does not exist in :data:`sys.modules`, the loader must create a new " -"module object and add it to :data:`sys.modules`." +"If there is an existing module object with the given name in :data:`sys." +"modules`, the loader must use that existing module. (Otherwise, :func:" +"`importlib.reload` will not work correctly.) If the named module does not " +"exist in :data:`sys.modules`, the loader must create a new module object and " +"add it to :data:`sys.modules`." msgstr "" -"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα " -"στο :data:`sys.modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον " -"module. (Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) " -"Αν το module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " +"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys." +"modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. " +"(Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το " +"module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " "loader πρέπει να δημιουργήσει νέο αντικείμενο module και να το προσθέσει " "στο :data:`sys.modules`." @@ -978,9 +971,9 @@ msgstr "" #: reference/import.rst:469 msgid "" -"If loading fails, the loader must remove any modules it has inserted " -"into :data:`sys.modules`, but it must remove **only** the failing module(s), " -"and only if the loader itself has loaded the module(s) explicitly." +"If loading fails, the loader must remove any modules it has inserted into :" +"data:`sys.modules`, but it must remove **only** the failing module(s), and " +"only if the loader itself has loaded the module(s) explicitly." msgstr "" "Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει " "εισάγει στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα " @@ -1072,9 +1065,9 @@ msgstr "" msgid "" "Given Python's familiar name binding rules this might seem surprising, but " "it's actually a fundamental feature of the import system. The invariant " -"holding is that if you have ``sys.modules['spam']`` and " -"``sys.modules['spam.foo']`` (as you would after the above import), the " -"latter must appear as the ``foo`` attribute of the former." +"holding is that if you have ``sys.modules['spam']`` and ``sys.modules['spam." +"foo']`` (as you would after the above import), the latter must appear as the " +"``foo`` attribute of the former." msgstr "" "Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό " "μπορεί να φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες " @@ -1118,8 +1111,8 @@ msgstr "" msgid "" "The module's spec is exposed as :attr:`module.__spec__`. Setting :attr:`!" "__spec__` appropriately applies equally to :ref:`modules initialized during " -"interpreter startup `. The one exception is ``__main__``, " -"where :attr:`!__spec__` is :ref:`set to None in some cases `." +"interpreter startup `. The one exception is ``__main__``, where :" +"attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" "Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " "του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται " @@ -1141,10 +1134,10 @@ msgstr "Χαρακτηριστικά __path__ στα modules" #: reference/import.rst:550 msgid "" -"The :attr:`~module.__path__` attribute should be a (possibly " -"empty) :term:`sequence` of strings enumerating the locations where the " -"package's submodules will be found. By definition, if a module has a :attr:`!" -"__path__` attribute, it is a :term:`package`." +"The :attr:`~module.__path__` attribute should be a (possibly empty) :term:" +"`sequence` of strings enumerating the locations where the package's " +"submodules will be found. By definition, if a module has a :attr:`!__path__` " +"attribute, it is a :term:`package`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια " "(ενδεχομένως κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις " @@ -1154,10 +1147,10 @@ msgstr "" #: reference/import.rst:555 msgid "" "A package's :attr:`~module.__path__` attribute is used during imports of its " -"subpackages. Within the import machinery, it functions much the same " -"as :data:`sys.path`, i.e. providing a list of locations to search for " -"modules during import. However, :attr:`!__path__` is typically much more " -"constrained than :data:`!sys.path`." +"subpackages. Within the import machinery, it functions much the same as :" +"data:`sys.path`, i.e. providing a list of locations to search for modules " +"during import. However, :attr:`!__path__` is typically much more constrained " +"than :data:`!sys.path`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά " "την εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί " @@ -1178,21 +1171,20 @@ msgstr "" #: reference/import.rst:566 msgid "" -"A package's ``__init__.py`` file may set or alter the " -"package's :attr:`~module.__path__` attribute, and this was typically the way " -"namespace packages were implemented prior to :pep:`420`. With the adoption " -"of :pep:`420`, namespace packages no longer need to supply ``__init__.py`` " -"files containing only :attr:`!__path__` manipulation code; the import " -"machinery automatically sets :attr:`!__path__` correctly for the namespace " -"package." +"A package's ``__init__.py`` file may set or alter the package's :attr:" +"`~module.__path__` attribute, and this was typically the way namespace " +"packages were implemented prior to :pep:`420`. With the adoption of :pep:" +"`420`, namespace packages no longer need to supply ``__init__.py`` files " +"containing only :attr:`!__path__` manipulation code; the import machinery " +"automatically sets :attr:`!__path__` correctly for the namespace package." msgstr "" "Το αρχείο ``__init__.py`` ενός πακέτου μπορεί να ορίζει ή να τροποποιεί το " "χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως " "ο τρόπος με τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. " "Με την υιοθέτηση του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να " -"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού " -"του :attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά " -"το :attr:`!__path__` για το namespace πακέτο." +"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :" +"attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά το :attr:`!" +"__path__` για το namespace πακέτο." #: reference/import.rst:575 msgid "Module reprs" @@ -1213,9 +1205,9 @@ msgid "" "If the module has a spec (``__spec__``), the import machinery will try to " "generate a repr from it. If that fails or there is no spec, the import " "system will craft a default repr using whatever information is available on " -"the module. It will try to use the ``module.__name__``, " -"``module.__file__``, and ``module.__loader__`` as input into the repr, with " -"defaults for whatever information is missing." +"the module. It will try to use the ``module.__name__``, ``module." +"__file__``, and ``module.__loader__`` as input into the repr, with defaults " +"for whatever information is missing." msgstr "" "Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει " "να παράγει repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα " @@ -1296,14 +1288,14 @@ msgstr "" msgid "" "Python also supports \"hash-based\" cache files, which store a hash of the " "source file's contents rather than its metadata. There are two variants of " -"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based " -"``.pyc`` files, Python validates the cache file by hashing the source file " -"and comparing the resulting hash with the hash in the cache file. If a " -"checked hash-based cache file is found to be invalid, Python regenerates it " -"and writes a new checked hash-based cache file. For unchecked hash-based " -"``.pyc`` files, Python simply assumes the cache file is valid if it exists. " -"Hash-based ``.pyc`` files validation behavior may be overridden with " -"the :option:`--check-hash-based-pycs` flag." +"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based ``." +"pyc`` files, Python validates the cache file by hashing the source file and " +"comparing the resulting hash with the hash in the cache file. If a checked " +"hash-based cache file is found to be invalid, Python regenerates it and " +"writes a new checked hash-based cache file. For unchecked hash-based ``." +"pyc`` files, Python simply assumes the cache file is valid if it exists. " +"Hash-based ``.pyc`` files validation behavior may be overridden with the :" +"option:`--check-hash-based-pycs` flag." msgstr "" "Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα " "οποία αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα " @@ -1334,17 +1326,17 @@ msgstr "Finder βασισμένος στη διαδρομή" #: reference/import.rst:641 msgid "" "As mentioned previously, Python comes with several default meta path " -"finders. One of these, called the :term:`path based finder` " -"(:class:`~importlib.machinery.PathFinder`), searches an :term:`import path`, " -"which contains a list of :term:`path entries `. Each path entry " -"names a location to search for modules." +"finders. One of these, called the :term:`path based finder` (:class:" +"`~importlib.machinery.PathFinder`), searches an :term:`import path`, which " +"contains a list of :term:`path entries `. Each path entry names " +"a location to search for modules." msgstr "" "Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς " -"προεπιλεγμένους meta path finders. Ένας από αυτούς, που " -"ονομάζεται :term:`path based finder` " -"(:class:`~importlib.machinery.PathFinder`), αναζητά σε ένα :term:`import " -"path`, το οποίο περιέχει μια λίστα από :term:`path entries `. " -"Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν modules." +"προεπιλεγμένους meta path finders. Ένας από αυτούς, που ονομάζεται :term:" +"`path based finder` (:class:`~importlib.machinery.PathFinder`), αναζητά σε " +"ένα :term:`import path`, το οποίο περιέχει μια λίστα από :term:`path entries " +"`. Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν " +"modules." #: reference/import.rst:647 msgid "" @@ -1362,16 +1354,16 @@ msgid "" "The default set of path entry finders implement all the semantics for " "finding modules on the file system, handling special file types such as " "Python source code (``.py`` files), Python byte code (``.pyc`` files) and " -"shared libraries (e.g. ``.so`` files). When supported by " -"the :mod:`zipimport` module in the standard library, the default path entry " -"finders also handle loading all of these file types (other than shared " -"libraries) from zipfiles." +"shared libraries (e.g. ``.so`` files). When supported by the :mod:" +"`zipimport` module in the standard library, the default path entry finders " +"also handle loading all of these file types (other than shared libraries) " +"from zipfiles." msgstr "" "Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη " "σημασιολογία για την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο " "ειδικούς τύπους αρχείων όπως πηγαίο κώδικα Python (αρχεία ``.py``), byte " -"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία " -"``.so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " +"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``." +"so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " "βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης διαδρομής χειρίζονται " "επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από κοινόχρηστες " "βιβλιοθήκες) από zipfiles." @@ -1409,8 +1401,8 @@ msgstr "" #: reference/import.rst:670 msgid "" "A word of warning: this section and the previous both use the term *finder*, " -"distinguishing between them by using the terms :term:`meta path finder` " -"and :term:`path entry finder`. These two types of finders are very similar, " +"distinguishing between them by using the terms :term:`meta path finder` and :" +"term:`path entry finder`. These two types of finders are very similar, " "support similar protocols, and function in similar ways during the import " "process, but it's important to keep in mind that they are subtly different. " "In particular, meta path finders operate at the beginning of the import " @@ -1422,8 +1414,8 @@ msgstr "" "παρόμοιοι, υποστηρίζουν παρόμοια πρωτόκολλα και λειτουργούν με παρόμοιο " "τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι σημαντικό να θυμάστε ότι " "έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders λειτουργούν στην " -"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση " -"του :data:`sys.meta_path`." +"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση του :data:" +"`sys.meta_path`." #: reference/import.rst:678 msgid "" @@ -1456,30 +1448,29 @@ msgstr "" #: reference/import.rst:698 msgid "" -"As a meta path finder, the :term:`path based finder` implements " -"the :meth:`~importlib.abc.MetaPathFinder.find_spec` protocol previously " -"described, however it exposes additional hooks that can be used to customize " -"how modules are found and loaded from the :term:`import path`." +"As a meta path finder, the :term:`path based finder` implements the :meth:" +"`~importlib.abc.MetaPathFinder.find_spec` protocol previously described, " +"however it exposes additional hooks that can be used to customize how " +"modules are found and loaded from the :term:`import path`." msgstr "" -"Ως meta path finder, ο :term:`path based finder` υλοποιεί το " -"πρωτόκολλο :meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε " -"προηγουμένως, ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν " -"για να προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από " -"το :term:`import path`." +"Ως meta path finder, ο :term:`path based finder` υλοποιεί το πρωτόκολλο :" +"meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε προηγουμένως, " +"ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " +"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import " +"path`." #: reference/import.rst:703 msgid "" -"Three variables are used by the :term:`path based " -"finder`, :data:`sys.path`, :data:`sys.path_hooks` " -"and :data:`sys.path_importer_cache`. The ``__path__`` attributes on package " -"objects are also used. These provide additional ways that the import " -"machinery can be customized." +"Three variables are used by the :term:`path based finder`, :data:`sys." +"path`, :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " +"``__path__`` attributes on package objects are also used. These provide " +"additional ways that the import machinery can be customized." msgstr "" -"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based " -"finder`: :data:`sys.path`, :data:`sys.path_hooks` " -"και :data:`sys.path_importer_cache`. Επίσης χρησιμοποιούνται τα " -"χαρακτηριστικά ``__path__`` σε αντικείμενα πακέτου. Αυτά παρέχουν επιπλέον " -"τρόπους παραμετροποίησης του μηχανισμού εισαγωγής." +"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based finder`: :data:" +"`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " +"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα " +"πακέτου. Αυτά παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού " +"εισαγωγής." #: reference/import.rst:708 msgid "" @@ -1487,10 +1478,10 @@ msgid "" "modules and packages. It is initialized from the :envvar:`PYTHONPATH` " "environment variable and various other installation- and implementation-" "specific defaults. Entries in :data:`sys.path` can name directories on the " -"file system, zip files, and potentially other \"locations\" (see " -"the :mod:`site` module) that should be searched for modules, such as URLs, " -"or database queries. Only strings should be present on :data:`sys.path`; " -"all other data types are ignored." +"file system, zip files, and potentially other \"locations\" (see the :mod:" +"`site` module) that should be searched for modules, such as URLs, or " +"database queries. Only strings should be present on :data:`sys.path`; all " +"other data types are ignored." msgstr "" "Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν " "τοποθεσίες αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη " @@ -1507,18 +1498,18 @@ msgid "" "The :term:`path based finder` is a :term:`meta path finder`, so the import " "machinery begins the :term:`import path` search by calling the path based " "finder's :meth:`~importlib.machinery.PathFinder.find_spec` method as " -"described previously. When the ``path`` argument " -"to :meth:`~importlib.machinery.PathFinder.find_spec` is given, it will be a " -"list of string paths to traverse - typically a package's ``__path__`` " -"attribute for an import within that package. If the ``path`` argument is " -"``None``, this indicates a top level import and :data:`sys.path` is used." +"described previously. When the ``path`` argument to :meth:`~importlib." +"machinery.PathFinder.find_spec` is given, it will be a list of string paths " +"to traverse - typically a package's ``__path__`` attribute for an import " +"within that package. If the ``path`` argument is ``None``, this indicates a " +"top level import and :data:`sys.path` is used." msgstr "" "Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο " "μηχανισμός εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας " "τη μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based " -"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` " -"στη :meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια " -"λίστα από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " +"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` στη :" +"meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα " +"από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " "``__path__`` ενός πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το " "όρισμα ``path`` είναι ``None``, αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου " "και χρησιμοποιείται το :data:`sys.path`." @@ -1526,17 +1517,17 @@ msgstr "" #: reference/import.rst:726 msgid "" "The path based finder iterates over every entry in the search path, and for " -"each of these, looks for an appropriate :term:`path entry finder` " -"(:class:`~importlib.abc.PathEntryFinder`) for the path entry. Because this " -"can be an expensive operation (e.g. there may be ``stat()`` call overheads " -"for this search), the path based finder maintains a cache mapping path " -"entries to path entry finders. This cache is maintained " -"in :data:`sys.path_importer_cache` (despite the name, this cache actually " -"stores finder objects rather than being limited to :term:`importer` " -"objects). In this way, the expensive search for a particular :term:`path " -"entry` location's :term:`path entry finder` need only be done once. User " -"code is free to remove cache entries from :data:`sys.path_importer_cache` " -"forcing the path based finder to perform the path entry search again." +"each of these, looks for an appropriate :term:`path entry finder` (:class:" +"`~importlib.abc.PathEntryFinder`) for the path entry. Because this can be " +"an expensive operation (e.g. there may be ``stat()`` call overheads for this " +"search), the path based finder maintains a cache mapping path entries to " +"path entry finders. This cache is maintained in :data:`sys." +"path_importer_cache` (despite the name, this cache actually stores finder " +"objects rather than being limited to :term:`importer` objects). In this way, " +"the expensive search for a particular :term:`path entry` location's :term:" +"`path entry finder` need only be done once. User code is free to remove " +"cache entries from :data:`sys.path_importer_cache` forcing the path based " +"finder to perform the path entry search again." msgstr "" "Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή " "αναζήτησης και, για καθεμία, αναζητά έναν κατάλληλο :term:`path entry " @@ -1549,20 +1540,20 @@ msgstr "" "προσωρινή μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` " "αντικείμενα). Με αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path " "entry finder` μιας συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία " -"φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από " -"το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based finder να " -"εκτελέσει ξανά την αναζήτηση." +"φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από το :data:`sys." +"path_importer_cache`, αναγκάζοντας τον path based finder να εκτελέσει ξανά " +"την αναζήτηση." #: reference/import.rst:739 msgid "" "If the path entry is not present in the cache, the path based finder " -"iterates over every callable in :data:`sys.path_hooks`. Each of " -"the :term:`path entry hooks ` in this list is called with a " -"single argument, the path entry to be searched. This callable may either " -"return a :term:`path entry finder` that can handle the path entry, or it may " -"raise :exc:`ImportError`. An :exc:`ImportError` is used by the path based " -"finder to signal that the hook cannot find a :term:`path entry finder` for " -"that :term:`path entry`. The exception is ignored and :term:`import path` " +"iterates over every callable in :data:`sys.path_hooks`. Each of the :term:" +"`path entry hooks ` in this list is called with a single " +"argument, the path entry to be searched. This callable may either return a :" +"term:`path entry finder` that can handle the path entry, or it may raise :" +"exc:`ImportError`. An :exc:`ImportError` is used by the path based finder " +"to signal that the hook cannot find a :term:`path entry finder` for that :" +"term:`path entry`. The exception is ignored and :term:`import path` " "iteration continues. The hook should expect either a string or bytes " "object; the encoding of bytes objects is up to the hook (e.g. it may be a " "file system encoding, UTF-8, or something else), and if the hook cannot " @@ -1573,9 +1564,9 @@ msgstr "" "Κάθε :term:`path entry hook ` σε αυτή τη λίστα καλείται με " "ένα μόνο όρισμα: την καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το " "callable μπορεί είτε να επιστρέψει έναν :term:`path entry finder` που μπορεί " -"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise " -"ένα :exc:`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path " -"based finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " +"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise ένα :exc:" +"`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path based " +"finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " "finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η " "επανάληψη στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει " "είτε συμβολοσειρά είτε αντικείμενο bytes· η κωδικοποίηση των bytes " @@ -1586,19 +1577,18 @@ msgstr "" #: reference/import.rst:753 msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " -"being returned, then the path based " -"finder's :meth:`~importlib.machinery.PathFinder.find_spec` method will store " -"``None`` in :data:`sys.path_importer_cache` (to indicate that there is no " -"finder for this path entry) and return ``None``, indicating that " -"this :term:`meta path finder` could not find the module." -msgstr "" -"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να " -"επιστραφεί :term:`path entry finder`, τότε η " -"μέθοδος :meth:`~importlib.machinery.PathFinder.find_spec` του path based " -"finder θα αποθηκεύσει ``None`` στο :data:`sys.path_importer_cache` (για να " -"δηλώσει ότι δεν υπάρχει finder για αυτή την καταχώρηση διαδρομής) και θα " -"επιστρέψει ``None``, δηλώνοντας ότι αυτός ο :term:`meta path finder` δεν " -"μπόρεσε να βρει το module." +"being returned, then the path based finder's :meth:`~importlib.machinery." +"PathFinder.find_spec` method will store ``None`` in :data:`sys." +"path_importer_cache` (to indicate that there is no finder for this path " +"entry) and return ``None``, indicating that this :term:`meta path finder` " +"could not find the module." +msgstr "" +"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :" +"term:`path entry finder`, τότε η μέθοδος :meth:`~importlib.machinery." +"PathFinder.find_spec` του path based finder θα αποθηκεύσει ``None`` στο :" +"data:`sys.path_importer_cache` (για να δηλώσει ότι δεν υπάρχει finder για " +"αυτή την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " +"αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." #: reference/import.rst:760 msgid "" @@ -1619,19 +1609,19 @@ msgid "" "current working directory cannot be determined or is found not to exist, no " "value is stored in :data:`sys.path_importer_cache`. Second, the value for " "the current working directory is looked up fresh for each module lookup. " -"Third, the path used for :data:`sys.path_importer_cache` and returned " -"by :meth:`importlib.machinery.PathFinder.find_spec` will be the actual " -"current working directory and not the empty string." +"Third, the path used for :data:`sys.path_importer_cache` and returned by :" +"meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " +"working directory and not the empty string." msgstr "" "Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- " -"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές " -"στο :data:`sys.path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν " -"διαπιστωθεί ότι δεν υπάρχει, δεν αποθηκεύεται τιμή " -"στο :data:`sys.path_importer_cache`. Δεύτερον, η τιμή για τον τρέχοντα " -"κατάλογο εργασίας αναζητείται εκ νέου για κάθε αναζήτηση module. Τρίτον, η " -"διαδρομή που χρησιμοποιείται για το :data:`sys.path_importer_cache` και " -"επιστρέφεται από τη :meth:`importlib.machinery.PathFinder.find_spec` θα " -"είναι ο πραγματικός τρέχων κατάλογος εργασίας και όχι η κενή συμβολοσειρά." +"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys." +"path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν διαπιστωθεί ότι δεν " +"υπάρχει, δεν αποθηκεύεται τιμή στο :data:`sys.path_importer_cache`. " +"Δεύτερον, η τιμή για τον τρέχοντα κατάλογο εργασίας αναζητείται εκ νέου για " +"κάθε αναζήτηση module. Τρίτον, η διαδρομή που χρησιμοποιείται για το :data:" +"`sys.path_importer_cache` και επιστρέφεται από τη :meth:`importlib.machinery." +"PathFinder.find_spec` θα είναι ο πραγματικός τρέχων κατάλογος εργασίας και " +"όχι η κενή συμβολοσειρά." #: reference/import.rst:775 msgid "Path entry finder protocol" @@ -1645,8 +1635,8 @@ msgid "" msgstr "" "Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, " "καθώς και για τη συνεισφορά portions σε namespace πακέτα, οι path entry " -"finders πρέπει να υλοποιούν τη " -"μέθοδο :meth:`~importlib.abc.PathEntryFinder.find_spec`." +"finders πρέπει να υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder." +"find_spec`." #: reference/import.rst:781 msgid "" @@ -1663,9 +1653,9 @@ msgstr "" #: reference/import.rst:786 msgid "" -"To indicate to the import machinery that the spec represents a " -"namespace :term:`portion`, the path entry finder sets " -"``submodule_search_locations`` to a list containing the portion." +"To indicate to the import machinery that the spec represents a namespace :" +"term:`portion`, the path entry finder sets ``submodule_search_locations`` to " +"a list containing the portion." msgstr "" "Για να δηλώσει στον μηχανισμό εισαγωγής ότι το spec αναπαριστά ένα " "namespace :term:`portion`, ο path entry finder ορίζει το " @@ -1702,8 +1692,8 @@ msgid "" msgstr "" "Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του " "module που εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο " -"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα " -"namespace :term:`portion`." +"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα namespace :term:" +"`portion`." #: reference/import.rst:806 msgid "" @@ -1758,9 +1748,9 @@ msgid "" "entirely with a custom meta path hook." msgstr "" "Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος " -"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων " -"του :data:`sys.meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο " -"hook μετά-διαδρομής." +"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys." +"meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-" +"διαδρομής." #: reference/import.rst:835 msgid "" @@ -1780,10 +1770,10 @@ msgstr "" msgid "" "To selectively prevent the import of some modules from a hook early on the " "meta path (rather than disabling the standard import system entirely), it is " -"sufficient to raise :exc:`ModuleNotFoundError` directly " -"from :meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning " -"``None``. The latter indicates that the meta path search should continue, " -"while raising an exception terminates it immediately." +"sufficient to raise :exc:`ModuleNotFoundError` directly from :meth:" +"`~importlib.abc.MetaPathFinder.find_spec` instead of returning ``None``. The " +"latter indicates that the meta path search should continue, while raising an " +"exception terminates it immediately." msgstr "" "Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook " "νωρίς στη μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα " @@ -1876,8 +1866,8 @@ msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" -"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά " -"το .moduleY δεν είναι έγκυρη έκφραση." +"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το ." +"moduleY δεν είναι έγκυρη έκφραση." #: reference/import.rst:892 msgid "Special considerations for __main__" @@ -1887,9 +1877,9 @@ msgstr "Ειδικές περιπτώσεις για το __main__" msgid "" "The :mod:`__main__` module is a special case relative to Python's import " "system. As noted :ref:`elsewhere `, the ``__main__`` module is " -"directly initialized at interpreter startup, much like :mod:`sys` " -"and :mod:`builtins`. However, unlike those two, it doesn't strictly qualify " -"as a built-in module. This is because the manner in which ``__main__`` is " +"directly initialized at interpreter startup, much like :mod:`sys` and :mod:" +"`builtins`. However, unlike those two, it doesn't strictly qualify as a " +"built-in module. This is because the manner in which ``__main__`` is " "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" @@ -1910,8 +1900,8 @@ msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" -"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το " -"``__main__.__spec__`` ορίζεται κατάλληλα ή σε ``None``." +"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__." +"__spec__`` ορίζεται κατάλληλα ή σε ``None``." #: reference/import.rst:910 msgid "" @@ -1927,14 +1917,13 @@ msgstr "" #: reference/import.rst:915 msgid "" -"In :ref:`the remaining cases ` " -"``__main__.__spec__`` is set to ``None``, as the code used to populate " -"the :mod:`__main__` does not correspond directly with an importable module:" +"In :ref:`the remaining cases ` ``__main__." +"__spec__`` is set to ``None``, as the code used to populate the :mod:" +"`__main__` does not correspond directly with an importable module:" msgstr "" -"Στις :ref:`υπόλοιπες περιπτώσεις ` το " -"``__main__.__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που " -"χρησιμοποιείται για να γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε " -"εισαγόμενο module:" +"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__." +"__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να " +"γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" #: reference/import.rst:919 msgid "interactive prompt" @@ -1956,8 +1945,8 @@ msgstr "εκτέλεση απευθείας από το αρχείο πηγαί msgid "" "Note that ``__main__.__spec__`` is always ``None`` in the last case, *even " "if* the file could technically be imported directly as a module instead. Use " -"the :option:`-m` switch if valid module metadata is desired " -"in :mod:`__main__`." +"the :option:`-m` switch if valid module metadata is desired in :mod:" +"`__main__`." msgstr "" "Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα " "``None``, *ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας " @@ -2060,19 +2049,17 @@ msgstr "Δείτε την :class:`types.ModuleType`." #: reference/import.rst:970 msgid "" "The importlib implementation avoids using the return value directly. " -"Instead, it gets the module object by looking the module name up " -"in :data:`sys.modules`. The indirect effect of this is that an imported " -"module may replace itself in :data:`sys.modules`. This is implementation-" -"specific behavior that is not guaranteed to work in other Python " -"implementations." +"Instead, it gets the module object by looking the module name up in :data:" +"`sys.modules`. The indirect effect of this is that an imported module may " +"replace itself in :data:`sys.modules`. This is implementation-specific " +"behavior that is not guaranteed to work in other Python implementations." msgstr "" "Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή " "επιστροφής. Αντ’ αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα " "του module στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα " -"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του " -"στο :data:`sys.modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης " -"υλοποίησης και δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της " -"Python." +"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του στο :data:`sys." +"modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης υλοποίησης και " +"δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της Python." #: reference/import.rst:8 msgid "import machinery" From 033232ca2b2392898d0c8a5af8870df79d37a825 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 18:03:08 +0200 Subject: [PATCH 14/17] Add missing words to the dictionary --- dictionaries/main.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index 2c957a62..b83a17f9 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -2178,6 +2178,9 @@ zoneinfo ψήφια ψευδο ψευδοκώδικα +ψευδοτερματικού +ψευδοτερματικό +ψευδοτερματικών ψευδοτυχαία ψευδοτυχαίες ψευδοτυχαίων From de8bfbd472822fa2968a71305ff18c2008588a94 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 18:07:18 +0200 Subject: [PATCH 15/17] Add missing words to the dictionary --- dictionaries/main.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dictionaries/main.txt b/dictionaries/main.txt index b83a17f9..9a37ba0e 100644 --- a/dictionaries/main.txt +++ b/dictionaries/main.txt @@ -1875,6 +1875,7 @@ zoneinfo επαναλήψιμους επαναληπτές επαναληπτή +επαναληπτών επαναρχικοποιήσει επαναφόρτωση επαναχρησιμοποιήσετε From eb5e21802f3f06dadce4bf836c6b3922bc2f10a2 Mon Sep 17 00:00:00 2001 From: vadal Date: Thu, 26 Feb 2026 18:20:50 +0200 Subject: [PATCH 16/17] Fix translation --- reference/import.po | 673 ++++++++++++++++++++++---------------------- 1 file changed, 343 insertions(+), 330 deletions(-) diff --git a/reference/import.po b/reference/import.po index 7c4fcdc1..334d1a90 100644 --- a/reference/import.po +++ b/reference/import.po @@ -26,15 +26,16 @@ msgid "" "Python code in one :term:`module` gains access to the code in another module " "by the process of :term:`importing` it. The :keyword:`import` statement is " "the most common way of invoking the import machinery, but it is not the only " -"way. Functions such as :func:`importlib.import_module` and built-in :func:" -"`__import__` can also be used to invoke the import machinery." +"way. Functions such as :func:`importlib.import_module` and built-" +"in :func:`__import__` can also be used to invoke the import machinery." msgstr "" "Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός " -"άλλου module μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:" -"`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού " -"import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως η :func:`importlib." -"import_module` και η ενσωματωμένη :func:`__import__` μπορούν επίσης να " -"χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού εισαγωγής." +"άλλου module μέσω της διαδικασίας του :term:`importing`. Η " +"δήλωση :keyword:`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του " +"μηχανισμού import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως " +"η :func:`importlib.import_module` και η ενσωματωμένη :func:`__import__` " +"μπορούν επίσης να χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού " +"εισαγωγής." #: reference/import.rst:16 msgid "" @@ -43,18 +44,19 @@ msgid "" "local scope. The search operation of the :keyword:`!import` statement is " "defined as a call to the :func:`__import__` function, with the appropriate " "arguments. The return value of :func:`__import__` is used to perform the " -"name binding operation of the :keyword:`!import` statement. See the :" -"keyword:`!import` statement for the exact details of that name binding " +"name binding operation of the :keyword:`!import` statement. See " +"the :keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" "Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με " "το συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της " "αναζήτησης σε ένα όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της " -"δήλωσης :keyword:`!import` ορίζεται ως κλήση της συνάρτησης :func:" -"`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής της :func:" -"`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " -"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` " -"για τις ακριβείς λεπτομέρειες αυτής της λειτουργίας." +"δήλωσης :keyword:`!import` ορίζεται ως κλήση της " +"συνάρτησης :func:`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής " +"της :func:`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία " +"δέσμευσης ονόματος της δήλωσης :keyword:`!import`. Δείτε τη " +"δήλωση :keyword:`!import` για τις ακριβείς λεπτομέρειες αυτής της " +"λειτουργίας." #: reference/import.rst:25 msgid "" @@ -72,10 +74,11 @@ msgstr "" #: reference/import.rst:31 msgid "" -"When an :keyword:`import` statement is executed, the standard builtin :func:" -"`__import__` function is called. Other mechanisms for invoking the import " -"system (such as :func:`importlib.import_module`) may choose to bypass :func:" -"`__import__` and use their own solutions to implement import semantics." +"When an :keyword:`import` statement is executed, the standard " +"builtin :func:`__import__` function is called. Other mechanisms for invoking " +"the import system (such as :func:`importlib.import_module`) may choose to " +"bypass :func:`__import__` and use their own solutions to implement import " +"semantics." msgstr "" "Όταν εκτελείται μια δήλωση :keyword:`import`, καλείται η τυπική ενσωματωμένη " "συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος " @@ -94,24 +97,24 @@ msgid "" msgstr "" "Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το " "βρει, δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το " -"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η εξαίρεση :" -"exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " -"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι " -"στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks " -"που περιγράφονται στις παρακάτω ενότητες." +"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η " +"εξαίρεση :exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές " +"αναζήτησης για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές " +"οι στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων " +"hooks που περιγράφονται στις παρακάτω ενότητες." #: reference/import.rst:43 msgid "" -"The import system has been updated to fully implement the second phase of :" -"pep:`302`. There is no longer any implicit import machinery - the full " +"The import system has been updated to fully implement the second phase " +"of :pep:`302`. There is no longer any implicit import machinery - the full " "import system is exposed through :data:`sys.meta_path`. In addition, native " "namespace package support has been implemented (see :pep:`420`)." msgstr "" "Το σύστημα εισαγωγής έχει ενημερωθεί ώστε να υλοποιεί πλήρως τη δεύτερη φάση " "του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο " "πλήρης μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. " -"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages (βλ. :" -"pep:`420`)." +"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages " +"(βλ. :pep:`420`)." #: reference/import.rst:51 msgid ":mod:`importlib`" @@ -190,8 +193,8 @@ msgstr "" "το όνομα του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη " "πρόσβασης σε χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package " "με όνομα :mod:`email`, το οποίο με τη σειρά του έχει ένα subpackage με " -"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με όνομα :" -"mod:`email.mime.text`." +"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με " +"όνομα :mod:`email.mime.text`." #: reference/import.rst:93 msgid "Regular packages" @@ -203,11 +206,11 @@ msgid "" "package>` and :term:`namespace packages `. Regular " "packages are traditional packages as they existed in Python 3.2 and earlier. " "A regular package is typically implemented as a directory containing an " -"``__init__.py`` file. When a regular package is imported, this ``__init__." -"py`` file is implicitly executed, and the objects it defines are bound to " -"names in the package's namespace. The ``__init__.py`` file can contain the " -"same Python code that any other module can contain, and Python will add some " -"additional attributes to the module when it is imported." +"``__init__.py`` file. When a regular package is imported, this " +"``__init__.py`` file is implicitly executed, and the objects it defines are " +"bound to names in the package's namespace. The ``__init__.py`` file can " +"contain the same Python code that any other module can contain, and Python " +"will add some additional attributes to the module when it is imported." msgstr "" "Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και τα :term:`namespace packages `. Τα regular " @@ -335,24 +338,24 @@ msgstr "" "Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως " "αναγνωρισμένο ` όνομα του module (ή του πακέτου, αλλά για " "τους σκοπούς αυτής της συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. " -"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της δήλωσης :keyword:" -"`import` ή από τις παραμέτρους των συναρτήσεων :func:`importlib." -"import_module` ή :func:`__import__`." +"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της " +"δήλωσης :keyword:`import` ή από τις παραμέτρους των " +"συναρτήσεων :func:`importlib.import_module` ή :func:`__import__`." #: reference/import.rst:168 msgid "" "This name will be used in various phases of the import search, and it may be " "the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python " -"first tries to import ``foo``, then ``foo.bar``, and finally ``foo.bar." -"baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " -"is raised." +"first tries to import ``foo``, then ``foo.bar``, and finally " +"``foo.bar.baz``. If any of the intermediate imports fail, " +"a :exc:`ModuleNotFoundError` is raised." msgstr "" "Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και " -"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar." -"baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει το " -"``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " -"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise η :exc:" -"`ModuleNotFoundError`." +"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. " +"``foo.bar.baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει " +"το ``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " +"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise " +"η :exc:`ModuleNotFoundError`." #: reference/import.rst:175 msgid "The module cache" @@ -367,20 +370,21 @@ msgid "" "and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" -"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:" -"`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " -"modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων " -"διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί προηγουμένως, το :data:" -"`sys.modules` θα περιέχει εγγραφές για τα ``foo``, ``foo.bar`` και ``foo.bar." -"baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο module." +"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι " +"το :data:`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη " +"όλων των modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των " +"ενδιάμεσων διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί " +"προηγουμένως, το :data:`sys.modules` θα περιέχει εγγραφές για τα ``foo``, " +"``foo.bar`` και ``foo.bar.baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο " +"αντικείμενο module." #: reference/import.rst:187 msgid "" "During import, the module name is looked up in :data:`sys.modules` and if " "present, the associated value is the module satisfying the import, and the " -"process completes. However, if the value is ``None``, then a :exc:" -"`ModuleNotFoundError` is raised. If the module name is missing, Python will " -"continue searching for the module." +"process completes. However, if the value is ``None``, then " +"a :exc:`ModuleNotFoundError` is raised. If the module name is missing, " +"Python will continue searching for the module." msgstr "" "Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` " "και, αν υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την " @@ -394,24 +398,24 @@ msgid "" "associated module (as other modules may hold references to it), but it will " "invalidate the cache entry for the named module, causing Python to search " "anew for the named module upon its next import. The key can also be assigned " -"to ``None``, forcing the next import of the module to result in a :exc:" -"`ModuleNotFoundError`." +"to ``None``, forcing the next import of the module to result in " +"a :exc:`ModuleNotFoundError`." msgstr "" "Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να " "μην καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν " "αναφορές σε αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το " "module με το συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει " "ξανά στην επόμενο εισαγωγή. Το κλειδί μπορεί επίσης να οριστεί σε ``None``, " -"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει σε :exc:" -"`ModuleNotFoundError`." +"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει " +"σε :exc:`ModuleNotFoundError`." #: reference/import.rst:200 msgid "" "Beware though, as if you keep a reference to the module object, invalidate " "its cache entry in :data:`sys.modules`, and then re-import the named module, " -"the two module objects will *not* be the same. By contrast, :func:`importlib." -"reload` will reuse the *same* module object, and simply reinitialise the " -"module contents by rerunning the module's code." +"the two module objects will *not* be the same. By " +"contrast, :func:`importlib.reload` will reuse the *same* module object, and " +"simply reinitialise the module contents by rerunning the module's code." msgstr "" "Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την " "εγγραφή του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε " @@ -428,12 +432,12 @@ msgstr "Finders και loaders" msgid "" "If the named module is not found in :data:`sys.modules`, then Python's " "import protocol is invoked to find and load the module. This protocol " -"consists of two conceptual objects, :term:`finders ` and :term:" -"`loaders `. A finder's job is to determine whether it can find the " -"named module using whatever strategy it knows about. Objects that implement " -"both of these interfaces are referred to as :term:`importers ` - " -"they return themselves when they find that they can load the requested " -"module." +"consists of two conceptual objects, :term:`finders ` " +"and :term:`loaders `. A finder's job is to determine whether it can " +"find the named module using whatever strategy it knows about. Objects that " +"implement both of these interfaces are referred to as :term:`importers " +"` - they return themselves when they find that they can load the " +"requested module." msgstr "" "Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "τότε ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να " @@ -500,10 +504,10 @@ msgid "" "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" -"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:" -"`loaders `, ενώ τώρα επιστρέφουν module specs που *περιέχουν* " -"loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά " -"έχουν λιγότερες ευθύνες." +"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν " +"απευθείας :term:`loaders `, ενώ τώρα επιστρέφουν module specs που " +"*περιέχουν* loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την " +"εισαγωγή, αλλά έχουν λιγότερες ευθύνες." #: reference/import.rst:249 msgid "Import hooks" @@ -536,15 +540,16 @@ msgstr "" #: reference/import.rst:269 msgid "" -"Import path hooks are called as part of :data:`sys.path` (or ``package." -"__path__``) processing, at the point where their associated path item is " -"encountered. Import path hooks are registered by adding new callables to :" -"data:`sys.path_hooks` as described below." +"Import path hooks are called as part of :data:`sys.path` (or " +"``package.__path__``) processing, at the point where their associated path " +"item is encountered. Import path hooks are registered by adding new " +"callables to :data:`sys.path_hooks` as described below." msgstr "" -"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys." -"path` (ή του ``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο " -"στοιχείο διαδρομής. Τα import path hooks καταχωρίζονται προσθέτοντας νέα " -"callables στο :data:`sys.path_hooks`, όπως περιγράφεται παρακάτω." +"Τα import path hooks καλούνται ως μέρος της επεξεργασίας " +"του :data:`sys.path` (ή του ``package.__path__``), στο σημείο όπου " +"συναντάται το αντίστοιχο στοιχείο διαδρομής. Τα import path hooks " +"καταχωρίζονται προσθέτοντας νέα callables στο :data:`sys.path_hooks`, όπως " +"περιγράφεται παρακάτω." #: reference/import.rst:276 msgid "The meta path" @@ -555,21 +560,21 @@ msgid "" "When the named module is not found in :data:`sys.modules`, Python next " "searches :data:`sys.meta_path`, which contains a list of meta path finder " "objects. These finders are queried in order to see if they know how to " -"handle the named module. Meta path finders must implement a method called :" -"meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments: " -"a name, an import path, and (optionally) a target module. The meta path " -"finder can use any strategy it wants to determine whether it can handle the " -"named module or not." +"handle the named module. Meta path finders must implement a method " +"called :meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three " +"arguments: a name, an import path, and (optionally) a target module. The " +"meta path finder can use any strategy it wants to determine whether it can " +"handle the named module or not." msgstr "" "Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "η Python στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο " "περιέχει μια λίστα από meta path finder αντικείμενα. Αυτοί οι finders " "ερωτώνται με τη σειρά για να διαπιστωθεί αν γνωρίζουν πώς να χειριστούν το " -"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με όνομα :meth:" -"`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία ορίσματα: " -"ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " -"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να " -"καθορίσει αν μπορεί να χειριστεί το module ή όχι." +"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με " +"όνομα :meth:`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία " +"ορίσματα: ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο " +"meta path finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για " +"να καθορίσει αν μπορεί να χειριστεί το module ή όχι." #: reference/import.rst:291 msgid "" @@ -606,10 +611,10 @@ msgstr "" "την αναζήτηση του module. Για modules ανωτέρου επιπέδου, το δεύτερο όρισμα " "είναι ``None``, αλλά για submodules ή subpackages, είναι η τιμή του " "χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η " -"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise το :exc:" -"`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο module " -"που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα εισαγωγής " -"περνά target module μόνο κατά την επαναφόρτωση." +"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise " +"το :exc:`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο " +"module που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα " +"εισαγωγής περνά target module μόνο κατά την επαναφόρτωση." #: reference/import.rst:308 msgid "" @@ -618,19 +623,21 @@ msgid "" "importing ``foo.bar.baz`` will first perform a top level import, calling " "``mpf.find_spec(\"foo\", None, None)`` on each meta path finder (``mpf``). " "After ``foo`` has been imported, ``foo.bar`` will be imported by traversing " -"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", foo." -"__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " -"will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." +"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", " +"foo.__path__, None)``. Once ``foo.bar`` has been imported, the final " +"traversal will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " +"None)``." msgstr "" "Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα " "εισαγωγής. Για παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules " "δεν έχει ήδη προστεθεί στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` " -"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το ``mpf." -"find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). Αφού " -"εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta path " -"για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " -"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα " -"καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." +"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το " +"``mpf.find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). " +"Αφού εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta " +"path για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", " +"foo.__path__, None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική " +"διάσχιση θα καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " +"None)``." #: reference/import.rst:318 msgid "" @@ -660,30 +667,30 @@ msgid "" "The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path " "finders replaced :meth:`!find_module`, which is now deprecated. While it " "will continue to work without change, the import machinery will try it only " -"if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." -"find_spec`." +"if the finder does not " +"implement :meth:`~importlib.abc.MetaPathFinder.find_spec`." msgstr "" "Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path " "finders αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί " "ως απαρχαιωμένη. Αν και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο " -"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί τη :meth:" -"`~importlib.abc.MetaPathFinder.find_spec`." +"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί " +"τη :meth:`~importlib.abc.MetaPathFinder.find_spec`." #: reference/import.rst:334 msgid "" -"Use of :meth:`!find_module` by the import system now raises :exc:" -"`ImportWarning`." +"Use of :meth:`!find_module` by the import system now " +"raises :exc:`ImportWarning`." msgstr "" "Η χρήση της :meth:`!find_module` από το σύστημα εισαγωγής πλέον κάνει raise " "την :exc:`ImportWarning`." #: reference/import.rst:338 msgid "" -":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." -"MetaPathFinder.find_spec` instead." +":meth:`!find_module` has been removed. " +"Use :meth:`~importlib.abc.MetaPathFinder.find_spec` instead." msgstr "" -"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε την :meth:`~importlib." -"abc.MetaPathFinder.find_spec` στη θέση της." +"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε " +"την :meth:`~importlib.abc.MetaPathFinder.find_spec` στη θέση της." #: reference/import.rst:344 msgid "Loading" @@ -765,11 +772,11 @@ msgstr "Σημειώστε τις ακόλουθες λεπτομέρειες:" #: reference/import.rst:381 msgid "" -"If there is an existing module object with the given name in :data:`sys." -"modules`, import will have already returned it." +"If there is an existing module object with the given name " +"in :data:`sys.modules`, import will have already returned it." msgstr "" -"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:" -"`sys.modules`, το import θα το έχει ήδη επιστρέψει." +"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα " +"στο :data:`sys.modules`, το import θα το έχει ήδη επιστρέψει." #: reference/import.rst:384 msgid "" @@ -781,17 +788,17 @@ msgid "" msgstr "" "Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " "κώδικα του module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί " -"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys." -"modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη χειρότερη περίπτωση " -"και πολλαπλή φόρτωση στην καλύτερη." +"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του " +"στο :data:`sys.modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη " +"χειρότερη περίπτωση και πολλαπλή φόρτωση στην καλύτερη." #: reference/import.rst:390 msgid "" "If loading fails, the failing module -- and only the failing module -- gets " -"removed from :data:`sys.modules`. Any module already in the :data:`sys." -"modules` cache, and any module that was successfully loaded as a side-" -"effect, must remain in the cache. This contrasts with reloading where even " -"the failing module is left in :data:`sys.modules`." +"removed from :data:`sys.modules`. Any module already in " +"the :data:`sys.modules` cache, and any module that was successfully loaded " +"as a side-effect, must remain in the cache. This contrasts with reloading " +"where even the failing module is left in :data:`sys.modules`." msgstr "" "Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται " "από το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή " @@ -833,12 +840,12 @@ msgstr "" #: reference/import.rst:408 msgid "" "The import system has taken over the boilerplate responsibilities of " -"loaders. These were previously performed by the :meth:`importlib.abc.Loader." -"load_module` method." +"loaders. These were previously performed by " +"the :meth:`importlib.abc.Loader.load_module` method." msgstr "" "Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. " -"Αυτές εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader." -"load_module`." +"Αυτές εκτελούνταν παλαιότερα από τη " +"μέθοδο :meth:`importlib.abc.Loader.load_module`." #: reference/import.rst:414 msgid "Loaders" @@ -852,10 +859,10 @@ msgid "" "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" "Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση " -"του module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc." -"Loader.exec_module` με ένα μόνο όρισμα, το αντικείμενο module που θα " -"εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει η :meth:`~importlib.abc.Loader." -"exec_module` αγνοείται." +"του module. Ο μηχανισμός εισαγωγής καλεί τη " +"μέθοδο :meth:`importlib.abc.Loader.exec_module` με ένα μόνο όρισμα, το " +"αντικείμενο module που θα εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει " +"η :meth:`~importlib.abc.Loader.exec_module` αγνοείται." #: reference/import.rst:421 msgid "Loaders must satisfy the following requirements:" @@ -873,13 +880,13 @@ msgstr "" #: reference/import.rst:427 msgid "" -"If the loader cannot execute the module, it should raise an :exc:" -"`ImportError`, although any other exception raised during :meth:`~importlib." -"abc.Loader.exec_module` will be propagated." +"If the loader cannot execute the module, it should raise " +"an :exc:`ImportError`, although any other exception raised " +"during :meth:`~importlib.abc.Loader.exec_module` will be propagated." msgstr "" -"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise το :" -"exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά τη :" -"meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." +"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise " +"το :exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά " +"τη :meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." #: reference/import.rst:431 msgid "" @@ -888,9 +895,9 @@ msgid "" "a spec with the loader set to ``self``." msgstr "" "Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο " -"αντικείμενο· σε αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc." -"MetaPathFinder.find_spec` απλώς θα επιστρέψει ένα spec με τον loader " -"ορισμένο σε ``self``." +"αντικείμενο· σε αυτές τις περιπτώσεις, η " +"μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` απλώς θα επιστρέψει " +"ένα spec με τον loader ορισμένο σε ``self``." #: reference/import.rst:435 msgid "" @@ -902,12 +909,12 @@ msgid "" "will create the new module itself." msgstr "" "Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module " -"κατά τη φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader." -"create_module`. Παίρνει ένα όρισμα, το module spec, και επιστρέφει το νέο " -"αντικείμενο module που θα χρησιμοποιηθεί κατά τη φόρτωση. Η " -"``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο αντικείμενο " -"module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " -"δημιουργήσει ο ίδιος το νέο module." +"κατά τη φόρτωση υλοποιώντας μια " +"μέθοδο :meth:`~importlib.abc.Loader.create_module`. Παίρνει ένα όρισμα, το " +"module spec, και επιστρέφει το νέο αντικείμενο module που θα χρησιμοποιηθεί " +"κατά τη φόρτωση. Η ``create_module()`` δεν χρειάζεται να ορίσει " +"χαρακτηριστικά στο αντικείμενο module. Αν η μέθοδος επιστρέψει ``None``, ο " +"μηχανισμός εισαγωγής θα δημιουργήσει ο ίδιος το νέο module." #: reference/import.rst:442 msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." @@ -915,13 +922,13 @@ msgstr "Η μέθοδος :meth:`~importlib.abc.Loader.create_module` των loa #: reference/import.rst:445 msgid "" -"The :meth:`~importlib.abc.Loader.load_module` method was replaced by :meth:" -"`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " -"boilerplate responsibilities of loading." +"The :meth:`~importlib.abc.Loader.load_module` method was replaced " +"by :meth:`~importlib.abc.Loader.exec_module` and the import machinery " +"assumed all the boilerplate responsibilities of loading." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από την :" -"meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε " -"όλες τις τυποποιημένες ευθύνες της φόρτωσης." +"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από " +"την :meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής " +"ανέλαβε όλες τις τυποποιημένες ευθύνες της φόρτωσης." #: reference/import.rst:450 msgid "" @@ -947,16 +954,16 @@ msgstr "" #: reference/import.rst:459 msgid "" -"If there is an existing module object with the given name in :data:`sys." -"modules`, the loader must use that existing module. (Otherwise, :func:" -"`importlib.reload` will not work correctly.) If the named module does not " -"exist in :data:`sys.modules`, the loader must create a new module object and " -"add it to :data:`sys.modules`." +"If there is an existing module object with the given name " +"in :data:`sys.modules`, the loader must use that existing module. " +"(Otherwise, :func:`importlib.reload` will not work correctly.) If the named " +"module does not exist in :data:`sys.modules`, the loader must create a new " +"module object and add it to :data:`sys.modules`." msgstr "" -"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys." -"modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. " -"(Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το " -"module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " +"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα " +"στο :data:`sys.modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον " +"module. (Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) " +"Αν το module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " "loader πρέπει να δημιουργήσει νέο αντικείμενο module και να το προσθέσει " "στο :data:`sys.modules`." @@ -971,9 +978,9 @@ msgstr "" #: reference/import.rst:469 msgid "" -"If loading fails, the loader must remove any modules it has inserted into :" -"data:`sys.modules`, but it must remove **only** the failing module(s), and " -"only if the loader itself has loaded the module(s) explicitly." +"If loading fails, the loader must remove any modules it has inserted " +"into :data:`sys.modules`, but it must remove **only** the failing module(s), " +"and only if the loader itself has loaded the module(s) explicitly." msgstr "" "Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει " "εισάγει στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα " @@ -1065,9 +1072,9 @@ msgstr "" msgid "" "Given Python's familiar name binding rules this might seem surprising, but " "it's actually a fundamental feature of the import system. The invariant " -"holding is that if you have ``sys.modules['spam']`` and ``sys.modules['spam." -"foo']`` (as you would after the above import), the latter must appear as the " -"``foo`` attribute of the former." +"holding is that if you have ``sys.modules['spam']`` and " +"``sys.modules['spam.foo']`` (as you would after the above import), the " +"latter must appear as the ``foo`` attribute of the former." msgstr "" "Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό " "μπορεί να φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες " @@ -1111,8 +1118,8 @@ msgstr "" msgid "" "The module's spec is exposed as :attr:`module.__spec__`. Setting :attr:`!" "__spec__` appropriately applies equally to :ref:`modules initialized during " -"interpreter startup `. The one exception is ``__main__``, where :" -"attr:`!__spec__` is :ref:`set to None in some cases `." +"interpreter startup `. The one exception is ``__main__``, " +"where :attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" "Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " "του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται " @@ -1134,10 +1141,10 @@ msgstr "Χαρακτηριστικά __path__ στα modules" #: reference/import.rst:550 msgid "" -"The :attr:`~module.__path__` attribute should be a (possibly empty) :term:" -"`sequence` of strings enumerating the locations where the package's " -"submodules will be found. By definition, if a module has a :attr:`!__path__` " -"attribute, it is a :term:`package`." +"The :attr:`~module.__path__` attribute should be a (possibly " +"empty) :term:`sequence` of strings enumerating the locations where the " +"package's submodules will be found. By definition, if a module has a :attr:`!" +"__path__` attribute, it is a :term:`package`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια " "(ενδεχομένως κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις " @@ -1147,10 +1154,10 @@ msgstr "" #: reference/import.rst:555 msgid "" "A package's :attr:`~module.__path__` attribute is used during imports of its " -"subpackages. Within the import machinery, it functions much the same as :" -"data:`sys.path`, i.e. providing a list of locations to search for modules " -"during import. However, :attr:`!__path__` is typically much more constrained " -"than :data:`!sys.path`." +"subpackages. Within the import machinery, it functions much the same " +"as :data:`sys.path`, i.e. providing a list of locations to search for " +"modules during import. However, :attr:`!__path__` is typically much more " +"constrained than :data:`!sys.path`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά " "την εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί " @@ -1171,20 +1178,21 @@ msgstr "" #: reference/import.rst:566 msgid "" -"A package's ``__init__.py`` file may set or alter the package's :attr:" -"`~module.__path__` attribute, and this was typically the way namespace " -"packages were implemented prior to :pep:`420`. With the adoption of :pep:" -"`420`, namespace packages no longer need to supply ``__init__.py`` files " -"containing only :attr:`!__path__` manipulation code; the import machinery " -"automatically sets :attr:`!__path__` correctly for the namespace package." +"A package's ``__init__.py`` file may set or alter the " +"package's :attr:`~module.__path__` attribute, and this was typically the way " +"namespace packages were implemented prior to :pep:`420`. With the adoption " +"of :pep:`420`, namespace packages no longer need to supply ``__init__.py`` " +"files containing only :attr:`!__path__` manipulation code; the import " +"machinery automatically sets :attr:`!__path__` correctly for the namespace " +"package." msgstr "" "Το αρχείο ``__init__.py`` ενός πακέτου μπορεί να ορίζει ή να τροποποιεί το " "χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως " "ο τρόπος με τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. " "Με την υιοθέτηση του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να " -"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :" -"attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά το :attr:`!" -"__path__` για το namespace πακέτο." +"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού " +"του :attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά " +"το :attr:`!__path__` για το namespace πακέτο." #: reference/import.rst:575 msgid "Module reprs" @@ -1205,9 +1213,9 @@ msgid "" "If the module has a spec (``__spec__``), the import machinery will try to " "generate a repr from it. If that fails or there is no spec, the import " "system will craft a default repr using whatever information is available on " -"the module. It will try to use the ``module.__name__``, ``module." -"__file__``, and ``module.__loader__`` as input into the repr, with defaults " -"for whatever information is missing." +"the module. It will try to use the ``module.__name__``, " +"``module.__file__``, and ``module.__loader__`` as input into the repr, with " +"defaults for whatever information is missing." msgstr "" "Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει " "να παράγει repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα " @@ -1288,14 +1296,14 @@ msgstr "" msgid "" "Python also supports \"hash-based\" cache files, which store a hash of the " "source file's contents rather than its metadata. There are two variants of " -"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based ``." -"pyc`` files, Python validates the cache file by hashing the source file and " -"comparing the resulting hash with the hash in the cache file. If a checked " -"hash-based cache file is found to be invalid, Python regenerates it and " -"writes a new checked hash-based cache file. For unchecked hash-based ``." -"pyc`` files, Python simply assumes the cache file is valid if it exists. " -"Hash-based ``.pyc`` files validation behavior may be overridden with the :" -"option:`--check-hash-based-pycs` flag." +"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based " +"``.pyc`` files, Python validates the cache file by hashing the source file " +"and comparing the resulting hash with the hash in the cache file. If a " +"checked hash-based cache file is found to be invalid, Python regenerates it " +"and writes a new checked hash-based cache file. For unchecked hash-based " +"``.pyc`` files, Python simply assumes the cache file is valid if it exists. " +"Hash-based ``.pyc`` files validation behavior may be overridden with " +"the :option:`--check-hash-based-pycs` flag." msgstr "" "Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα " "οποία αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα " @@ -1326,17 +1334,17 @@ msgstr "Finder βασισμένος στη διαδρομή" #: reference/import.rst:641 msgid "" "As mentioned previously, Python comes with several default meta path " -"finders. One of these, called the :term:`path based finder` (:class:" -"`~importlib.machinery.PathFinder`), searches an :term:`import path`, which " -"contains a list of :term:`path entries `. Each path entry names " -"a location to search for modules." +"finders. One of these, called the :term:`path based finder` " +"(:class:`~importlib.machinery.PathFinder`), searches an :term:`import path`, " +"which contains a list of :term:`path entries `. Each path entry " +"names a location to search for modules." msgstr "" "Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς " -"προεπιλεγμένους meta path finders. Ένας από αυτούς, που ονομάζεται :term:" -"`path based finder` (:class:`~importlib.machinery.PathFinder`), αναζητά σε " -"ένα :term:`import path`, το οποίο περιέχει μια λίστα από :term:`path entries " -"`. Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν " -"modules." +"προεπιλεγμένους meta path finders. Ένας από αυτούς, που " +"ονομάζεται :term:`path based finder` " +"(:class:`~importlib.machinery.PathFinder`), αναζητά σε ένα :term:`import " +"path`, το οποίο περιέχει μια λίστα από :term:`path entries `. " +"Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν modules." #: reference/import.rst:647 msgid "" @@ -1354,16 +1362,16 @@ msgid "" "The default set of path entry finders implement all the semantics for " "finding modules on the file system, handling special file types such as " "Python source code (``.py`` files), Python byte code (``.pyc`` files) and " -"shared libraries (e.g. ``.so`` files). When supported by the :mod:" -"`zipimport` module in the standard library, the default path entry finders " -"also handle loading all of these file types (other than shared libraries) " -"from zipfiles." +"shared libraries (e.g. ``.so`` files). When supported by " +"the :mod:`zipimport` module in the standard library, the default path entry " +"finders also handle loading all of these file types (other than shared " +"libraries) from zipfiles." msgstr "" "Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη " "σημασιολογία για την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο " "ειδικούς τύπους αρχείων όπως πηγαίο κώδικα Python (αρχεία ``.py``), byte " -"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``." -"so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " +"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία " +"``.so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " "βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης διαδρομής χειρίζονται " "επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από κοινόχρηστες " "βιβλιοθήκες) από zipfiles." @@ -1401,8 +1409,8 @@ msgstr "" #: reference/import.rst:670 msgid "" "A word of warning: this section and the previous both use the term *finder*, " -"distinguishing between them by using the terms :term:`meta path finder` and :" -"term:`path entry finder`. These two types of finders are very similar, " +"distinguishing between them by using the terms :term:`meta path finder` " +"and :term:`path entry finder`. These two types of finders are very similar, " "support similar protocols, and function in similar ways during the import " "process, but it's important to keep in mind that they are subtly different. " "In particular, meta path finders operate at the beginning of the import " @@ -1414,8 +1422,8 @@ msgstr "" "παρόμοιοι, υποστηρίζουν παρόμοια πρωτόκολλα και λειτουργούν με παρόμοιο " "τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι σημαντικό να θυμάστε ότι " "έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders λειτουργούν στην " -"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση του :data:" -"`sys.meta_path`." +"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση " +"του :data:`sys.meta_path`." #: reference/import.rst:678 msgid "" @@ -1448,29 +1456,30 @@ msgstr "" #: reference/import.rst:698 msgid "" -"As a meta path finder, the :term:`path based finder` implements the :meth:" -"`~importlib.abc.MetaPathFinder.find_spec` protocol previously described, " -"however it exposes additional hooks that can be used to customize how " -"modules are found and loaded from the :term:`import path`." +"As a meta path finder, the :term:`path based finder` implements " +"the :meth:`~importlib.abc.MetaPathFinder.find_spec` protocol previously " +"described, however it exposes additional hooks that can be used to customize " +"how modules are found and loaded from the :term:`import path`." msgstr "" -"Ως meta path finder, ο :term:`path based finder` υλοποιεί το πρωτόκολλο :" -"meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε προηγουμένως, " -"ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " -"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import " -"path`." +"Ως meta path finder, ο :term:`path based finder` υλοποιεί το " +"πρωτόκολλο :meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε " +"προηγουμένως, ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν " +"για να προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από " +"το :term:`import path`." #: reference/import.rst:703 msgid "" -"Three variables are used by the :term:`path based finder`, :data:`sys." -"path`, :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " -"``__path__`` attributes on package objects are also used. These provide " -"additional ways that the import machinery can be customized." +"Three variables are used by the :term:`path based " +"finder`, :data:`sys.path`, :data:`sys.path_hooks` " +"and :data:`sys.path_importer_cache`. The ``__path__`` attributes on package " +"objects are also used. These provide additional ways that the import " +"machinery can be customized." msgstr "" -"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based finder`: :data:" -"`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " -"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα " -"πακέτου. Αυτά παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού " -"εισαγωγής." +"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based " +"finder`: :data:`sys.path`, :data:`sys.path_hooks` " +"και :data:`sys.path_importer_cache`. Επίσης χρησιμοποιούνται τα " +"χαρακτηριστικά ``__path__`` σε αντικείμενα πακέτου. Αυτά παρέχουν επιπλέον " +"τρόπους παραμετροποίησης του μηχανισμού εισαγωγής." #: reference/import.rst:708 msgid "" @@ -1478,10 +1487,10 @@ msgid "" "modules and packages. It is initialized from the :envvar:`PYTHONPATH` " "environment variable and various other installation- and implementation-" "specific defaults. Entries in :data:`sys.path` can name directories on the " -"file system, zip files, and potentially other \"locations\" (see the :mod:" -"`site` module) that should be searched for modules, such as URLs, or " -"database queries. Only strings should be present on :data:`sys.path`; all " -"other data types are ignored." +"file system, zip files, and potentially other \"locations\" (see " +"the :mod:`site` module) that should be searched for modules, such as URLs, " +"or database queries. Only strings should be present on :data:`sys.path`; " +"all other data types are ignored." msgstr "" "Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν " "τοποθεσίες αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη " @@ -1498,18 +1507,18 @@ msgid "" "The :term:`path based finder` is a :term:`meta path finder`, so the import " "machinery begins the :term:`import path` search by calling the path based " "finder's :meth:`~importlib.machinery.PathFinder.find_spec` method as " -"described previously. When the ``path`` argument to :meth:`~importlib." -"machinery.PathFinder.find_spec` is given, it will be a list of string paths " -"to traverse - typically a package's ``__path__`` attribute for an import " -"within that package. If the ``path`` argument is ``None``, this indicates a " -"top level import and :data:`sys.path` is used." +"described previously. When the ``path`` argument " +"to :meth:`~importlib.machinery.PathFinder.find_spec` is given, it will be a " +"list of string paths to traverse - typically a package's ``__path__`` " +"attribute for an import within that package. If the ``path`` argument is " +"``None``, this indicates a top level import and :data:`sys.path` is used." msgstr "" "Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο " "μηχανισμός εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας " "τη μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based " -"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` στη :" -"meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα " -"από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " +"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` " +"στη :meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια " +"λίστα από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " "``__path__`` ενός πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το " "όρισμα ``path`` είναι ``None``, αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου " "και χρησιμοποιείται το :data:`sys.path`." @@ -1517,17 +1526,17 @@ msgstr "" #: reference/import.rst:726 msgid "" "The path based finder iterates over every entry in the search path, and for " -"each of these, looks for an appropriate :term:`path entry finder` (:class:" -"`~importlib.abc.PathEntryFinder`) for the path entry. Because this can be " -"an expensive operation (e.g. there may be ``stat()`` call overheads for this " -"search), the path based finder maintains a cache mapping path entries to " -"path entry finders. This cache is maintained in :data:`sys." -"path_importer_cache` (despite the name, this cache actually stores finder " -"objects rather than being limited to :term:`importer` objects). In this way, " -"the expensive search for a particular :term:`path entry` location's :term:" -"`path entry finder` need only be done once. User code is free to remove " -"cache entries from :data:`sys.path_importer_cache` forcing the path based " -"finder to perform the path entry search again." +"each of these, looks for an appropriate :term:`path entry finder` " +"(:class:`~importlib.abc.PathEntryFinder`) for the path entry. Because this " +"can be an expensive operation (e.g. there may be ``stat()`` call overheads " +"for this search), the path based finder maintains a cache mapping path " +"entries to path entry finders. This cache is maintained " +"in :data:`sys.path_importer_cache` (despite the name, this cache actually " +"stores finder objects rather than being limited to :term:`importer` " +"objects). In this way, the expensive search for a particular :term:`path " +"entry` location's :term:`path entry finder` need only be done once. User " +"code is free to remove cache entries from :data:`sys.path_importer_cache` " +"forcing the path based finder to perform the path entry search again." msgstr "" "Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή " "αναζήτησης και, για καθεμία, αναζητά έναν κατάλληλο :term:`path entry " @@ -1539,21 +1548,21 @@ msgstr "" "διατηρείται στο :data:`sys.path_importer_cache` (παρά το όνομα, αυτή η " "προσωρινή μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` " "αντικείμενα). Με αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path " -"entry finder` μιας συγκεκριμένης τοποθεσίας χρειάζεται να γίνει μόνο μία " -"φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από το :data:`sys." -"path_importer_cache`, αναγκάζοντας τον path based finder να εκτελέσει ξανά " -"την αναζήτηση." +"entry` μιας συγκεκριμένης τοποθεσίας :term:`path entry finder` χρειάζεται να " +"γίνει μόνο μία φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από " +"το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based finder να " +"εκτελέσει ξανά την αναζήτηση." #: reference/import.rst:739 msgid "" "If the path entry is not present in the cache, the path based finder " -"iterates over every callable in :data:`sys.path_hooks`. Each of the :term:" -"`path entry hooks ` in this list is called with a single " -"argument, the path entry to be searched. This callable may either return a :" -"term:`path entry finder` that can handle the path entry, or it may raise :" -"exc:`ImportError`. An :exc:`ImportError` is used by the path based finder " -"to signal that the hook cannot find a :term:`path entry finder` for that :" -"term:`path entry`. The exception is ignored and :term:`import path` " +"iterates over every callable in :data:`sys.path_hooks`. Each of " +"the :term:`path entry hooks ` in this list is called with a " +"single argument, the path entry to be searched. This callable may either " +"return a :term:`path entry finder` that can handle the path entry, or it may " +"raise :exc:`ImportError`. An :exc:`ImportError` is used by the path based " +"finder to signal that the hook cannot find a :term:`path entry finder` for " +"that :term:`path entry`. The exception is ignored and :term:`import path` " "iteration continues. The hook should expect either a string or bytes " "object; the encoding of bytes objects is up to the hook (e.g. it may be a " "file system encoding, UTF-8, or something else), and if the hook cannot " @@ -1564,9 +1573,9 @@ msgstr "" "Κάθε :term:`path entry hook ` σε αυτή τη λίστα καλείται με " "ένα μόνο όρισμα: την καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το " "callable μπορεί είτε να επιστρέψει έναν :term:`path entry finder` που μπορεί " -"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise ένα :exc:" -"`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path based " -"finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " +"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise " +"ένα :exc:`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path " +"based finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " "finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η " "επανάληψη στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει " "είτε συμβολοσειρά είτε αντικείμενο bytes· η κωδικοποίηση των bytes " @@ -1577,18 +1586,19 @@ msgstr "" #: reference/import.rst:753 msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " -"being returned, then the path based finder's :meth:`~importlib.machinery." -"PathFinder.find_spec` method will store ``None`` in :data:`sys." -"path_importer_cache` (to indicate that there is no finder for this path " -"entry) and return ``None``, indicating that this :term:`meta path finder` " -"could not find the module." -msgstr "" -"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :" -"term:`path entry finder`, τότε η μέθοδος :meth:`~importlib.machinery." -"PathFinder.find_spec` του path based finder θα αποθηκεύσει ``None`` στο :" -"data:`sys.path_importer_cache` (για να δηλώσει ότι δεν υπάρχει finder για " -"αυτή την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " -"αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." +"being returned, then the path based " +"finder's :meth:`~importlib.machinery.PathFinder.find_spec` method will store " +"``None`` in :data:`sys.path_importer_cache` (to indicate that there is no " +"finder for this path entry) and return ``None``, indicating that " +"this :term:`meta path finder` could not find the module." +msgstr "" +"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να " +"επιστραφεί :term:`path entry finder`, τότε η " +"μέθοδος :meth:`~importlib.machinery.PathFinder.find_spec` του path based " +"finder θα αποθηκεύσει ``None`` στο :data:`sys.path_importer_cache` (για να " +"δηλώσει ότι δεν υπάρχει finder για αυτή την καταχώρηση διαδρομής) και θα " +"επιστρέψει ``None``, δηλώνοντας ότι αυτός ο :term:`meta path finder` δεν " +"μπόρεσε να βρει το module." #: reference/import.rst:760 msgid "" @@ -1609,19 +1619,19 @@ msgid "" "current working directory cannot be determined or is found not to exist, no " "value is stored in :data:`sys.path_importer_cache`. Second, the value for " "the current working directory is looked up fresh for each module lookup. " -"Third, the path used for :data:`sys.path_importer_cache` and returned by :" -"meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " -"working directory and not the empty string." +"Third, the path used for :data:`sys.path_importer_cache` and returned " +"by :meth:`importlib.machinery.PathFinder.find_spec` will be the actual " +"current working directory and not the empty string." msgstr "" "Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- " -"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys." -"path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν διαπιστωθεί ότι δεν " -"υπάρχει, δεν αποθηκεύεται τιμή στο :data:`sys.path_importer_cache`. " -"Δεύτερον, η τιμή για τον τρέχοντα κατάλογο εργασίας αναζητείται εκ νέου για " -"κάθε αναζήτηση module. Τρίτον, η διαδρομή που χρησιμοποιείται για το :data:" -"`sys.path_importer_cache` και επιστρέφεται από τη :meth:`importlib.machinery." -"PathFinder.find_spec` θα είναι ο πραγματικός τρέχων κατάλογος εργασίας και " -"όχι η κενή συμβολοσειρά." +"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές " +"στο :data:`sys.path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν " +"διαπιστωθεί ότι δεν υπάρχει, δεν αποθηκεύεται τιμή " +"στο :data:`sys.path_importer_cache`. Δεύτερον, η τιμή για τον τρέχοντα " +"κατάλογο εργασίας αναζητείται εκ νέου για κάθε αναζήτηση module. Τρίτον, η " +"διαδρομή που χρησιμοποιείται για το :data:`sys.path_importer_cache` και " +"επιστρέφεται από τη :meth:`importlib.machinery.PathFinder.find_spec` θα " +"είναι ο πραγματικός τρέχων κατάλογος εργασίας και όχι η κενή συμβολοσειρά." #: reference/import.rst:775 msgid "Path entry finder protocol" @@ -1635,8 +1645,8 @@ msgid "" msgstr "" "Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, " "καθώς και για τη συνεισφορά portions σε namespace πακέτα, οι path entry " -"finders πρέπει να υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder." -"find_spec`." +"finders πρέπει να υλοποιούν τη " +"μέθοδο :meth:`~importlib.abc.PathEntryFinder.find_spec`." #: reference/import.rst:781 msgid "" @@ -1653,9 +1663,9 @@ msgstr "" #: reference/import.rst:786 msgid "" -"To indicate to the import machinery that the spec represents a namespace :" -"term:`portion`, the path entry finder sets ``submodule_search_locations`` to " -"a list containing the portion." +"To indicate to the import machinery that the spec represents a " +"namespace :term:`portion`, the path entry finder sets " +"``submodule_search_locations`` to a list containing the portion." msgstr "" "Για να δηλώσει στον μηχανισμό εισαγωγής ότι το spec αναπαριστά ένα " "namespace :term:`portion`, ο path entry finder ορίζει το " @@ -1692,8 +1702,8 @@ msgid "" msgstr "" "Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του " "module που εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο " -"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα namespace :term:" -"`portion`." +"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα " +"namespace :term:`portion`." #: reference/import.rst:806 msgid "" @@ -1748,9 +1758,9 @@ msgid "" "entirely with a custom meta path hook." msgstr "" "Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος " -"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys." -"meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-" -"διαδρομής." +"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων " +"του :data:`sys.meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο " +"hook μετά-διαδρομής." #: reference/import.rst:835 msgid "" @@ -1770,10 +1780,10 @@ msgstr "" msgid "" "To selectively prevent the import of some modules from a hook early on the " "meta path (rather than disabling the standard import system entirely), it is " -"sufficient to raise :exc:`ModuleNotFoundError` directly from :meth:" -"`~importlib.abc.MetaPathFinder.find_spec` instead of returning ``None``. The " -"latter indicates that the meta path search should continue, while raising an " -"exception terminates it immediately." +"sufficient to raise :exc:`ModuleNotFoundError` directly " +"from :meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning " +"``None``. The latter indicates that the meta path search should continue, " +"while raising an exception terminates it immediately." msgstr "" "Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook " "νωρίς στη μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα " @@ -1866,8 +1876,8 @@ msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" -"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το ." -"moduleY δεν είναι έγκυρη έκφραση." +"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά " +"το .moduleY δεν είναι έγκυρη έκφραση." #: reference/import.rst:892 msgid "Special considerations for __main__" @@ -1877,9 +1887,9 @@ msgstr "Ειδικές περιπτώσεις για το __main__" msgid "" "The :mod:`__main__` module is a special case relative to Python's import " "system. As noted :ref:`elsewhere `, the ``__main__`` module is " -"directly initialized at interpreter startup, much like :mod:`sys` and :mod:" -"`builtins`. However, unlike those two, it doesn't strictly qualify as a " -"built-in module. This is because the manner in which ``__main__`` is " +"directly initialized at interpreter startup, much like :mod:`sys` " +"and :mod:`builtins`. However, unlike those two, it doesn't strictly qualify " +"as a built-in module. This is because the manner in which ``__main__`` is " "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" @@ -1900,8 +1910,8 @@ msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" -"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__." -"__spec__`` ορίζεται κατάλληλα ή σε ``None``." +"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το " +"``__main__.__spec__`` ορίζεται κατάλληλα ή σε ``None``." #: reference/import.rst:910 msgid "" @@ -1917,13 +1927,14 @@ msgstr "" #: reference/import.rst:915 msgid "" -"In :ref:`the remaining cases ` ``__main__." -"__spec__`` is set to ``None``, as the code used to populate the :mod:" -"`__main__` does not correspond directly with an importable module:" +"In :ref:`the remaining cases ` " +"``__main__.__spec__`` is set to ``None``, as the code used to populate " +"the :mod:`__main__` does not correspond directly with an importable module:" msgstr "" -"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__." -"__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να " -"γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" +"Στις :ref:`υπόλοιπες περιπτώσεις ` το " +"``__main__.__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που " +"χρησιμοποιείται για να γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε " +"εισαγόμενο module:" #: reference/import.rst:919 msgid "interactive prompt" @@ -1945,8 +1956,8 @@ msgstr "εκτέλεση απευθείας από το αρχείο πηγαί msgid "" "Note that ``__main__.__spec__`` is always ``None`` in the last case, *even " "if* the file could technically be imported directly as a module instead. Use " -"the :option:`-m` switch if valid module metadata is desired in :mod:" -"`__main__`." +"the :option:`-m` switch if valid module metadata is desired " +"in :mod:`__main__`." msgstr "" "Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα " "``None``, *ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας " @@ -2049,17 +2060,19 @@ msgstr "Δείτε την :class:`types.ModuleType`." #: reference/import.rst:970 msgid "" "The importlib implementation avoids using the return value directly. " -"Instead, it gets the module object by looking the module name up in :data:" -"`sys.modules`. The indirect effect of this is that an imported module may " -"replace itself in :data:`sys.modules`. This is implementation-specific " -"behavior that is not guaranteed to work in other Python implementations." +"Instead, it gets the module object by looking the module name up " +"in :data:`sys.modules`. The indirect effect of this is that an imported " +"module may replace itself in :data:`sys.modules`. This is implementation-" +"specific behavior that is not guaranteed to work in other Python " +"implementations." msgstr "" "Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή " "επιστροφής. Αντ’ αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα " "του module στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα " -"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του στο :data:`sys." -"modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης υλοποίησης και " -"δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της Python." +"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του " +"στο :data:`sys.modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης " +"υλοποίησης και δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της " +"Python." #: reference/import.rst:8 msgid "import machinery" From 272b959a7431612ee44bee249d7ef9eafb372e69 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:23:07 +0000 Subject: [PATCH 17/17] [pre-commit.ci lite] apply automatic fixes --- reference/import.po | 669 ++++++++++++++++++++++---------------------- 1 file changed, 328 insertions(+), 341 deletions(-) diff --git a/reference/import.po b/reference/import.po index 334d1a90..813b51fb 100644 --- a/reference/import.po +++ b/reference/import.po @@ -26,16 +26,15 @@ msgid "" "Python code in one :term:`module` gains access to the code in another module " "by the process of :term:`importing` it. The :keyword:`import` statement is " "the most common way of invoking the import machinery, but it is not the only " -"way. Functions such as :func:`importlib.import_module` and built-" -"in :func:`__import__` can also be used to invoke the import machinery." +"way. Functions such as :func:`importlib.import_module` and built-in :func:" +"`__import__` can also be used to invoke the import machinery." msgstr "" "Ο κώδικας Python σε ένα :term:`module` αποκτά πρόσβαση στον κώδικα ενός " -"άλλου module μέσω της διαδικασίας του :term:`importing`. Η " -"δήλωση :keyword:`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του " -"μηχανισμού import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως " -"η :func:`importlib.import_module` και η ενσωματωμένη :func:`__import__` " -"μπορούν επίσης να χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού " -"εισαγωγής." +"άλλου module μέσω της διαδικασίας του :term:`importing`. Η δήλωση :keyword:" +"`import` είναι ο πιο συνηθισμένος τρόπος ενεργοποίησης του μηχανισμού " +"import, αλλά δεν είναι ο μόνος. Συναρτήσεις όπως η :func:`importlib." +"import_module` και η ενσωματωμένη :func:`__import__` μπορούν επίσης να " +"χρησιμοποιηθούν για την ενεργοποίηση του μηχανισμού εισαγωγής." #: reference/import.rst:16 msgid "" @@ -44,19 +43,18 @@ msgid "" "local scope. The search operation of the :keyword:`!import` statement is " "defined as a call to the :func:`__import__` function, with the appropriate " "arguments. The return value of :func:`__import__` is used to perform the " -"name binding operation of the :keyword:`!import` statement. See " -"the :keyword:`!import` statement for the exact details of that name binding " +"name binding operation of the :keyword:`!import` statement. See the :" +"keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" "Η δήλωση :keyword:`import` συνδυάζει δύο λειτουργίες: αναζητά το module με " "το συγκεκριμένο όνομα και στη συνέχεια συνδέει τα αποτελέσματα αυτής της " "αναζήτησης σε ένα όνομα στο τοπικό scope. Η λειτουργία αναζήτησης της " -"δήλωσης :keyword:`!import` ορίζεται ως κλήση της " -"συνάρτησης :func:`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής " -"της :func:`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία " -"δέσμευσης ονόματος της δήλωσης :keyword:`!import`. Δείτε τη " -"δήλωση :keyword:`!import` για τις ακριβείς λεπτομέρειες αυτής της " -"λειτουργίας." +"δήλωσης :keyword:`!import` ορίζεται ως κλήση της συνάρτησης :func:" +"`__import__`, με τα κατάλληλα ορίσματα. Η τιμή επιστροφής της :func:" +"`__import__` χρησιμοποιείται για να εκτελεστεί η λειτουργία δέσμευσης " +"ονόματος της δήλωσης :keyword:`!import`. Δείτε τη δήλωση :keyword:`!import` " +"για τις ακριβείς λεπτομέρειες αυτής της λειτουργίας." #: reference/import.rst:25 msgid "" @@ -74,11 +72,10 @@ msgstr "" #: reference/import.rst:31 msgid "" -"When an :keyword:`import` statement is executed, the standard " -"builtin :func:`__import__` function is called. Other mechanisms for invoking " -"the import system (such as :func:`importlib.import_module`) may choose to " -"bypass :func:`__import__` and use their own solutions to implement import " -"semantics." +"When an :keyword:`import` statement is executed, the standard builtin :func:" +"`__import__` function is called. Other mechanisms for invoking the import " +"system (such as :func:`importlib.import_module`) may choose to bypass :func:" +"`__import__` and use their own solutions to implement import semantics." msgstr "" "Όταν εκτελείται μια δήλωση :keyword:`import`, καλείται η τυπική ενσωματωμένη " "συνάρτηση :func:`__import__`. Άλλοι μηχανισμοί ενεργοποίησης του συστήματος " @@ -97,24 +94,24 @@ msgid "" msgstr "" "Όταν εισάγεται ένα module για πρώτη φορά, η Python το αναζητά και, αν το " "βρει, δημιουργεί ένα αντικείμενο module [#fnmo]_, αρχικοποιώντας το. Αν το " -"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η " -"εξαίρεση :exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές " -"αναζήτησης για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές " -"οι στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων " -"hooks που περιγράφονται στις παρακάτω ενότητες." +"module με το συγκεκριμένο όνομα δεν μπορεί να βρεθεί, εγείρεται η εξαίρεση :" +"exc:`ModuleNotFoundError`. Η Python υλοποιεί διάφορες στρατηγικές αναζήτησης " +"για το module όταν ενεργοποιείται ο μηχανισμός εισαγωγής. Αυτές οι " +"στρατηγικές μπορούν να τροποποιηθούν και να επεκταθούν μέσω διάφορων hooks " +"που περιγράφονται στις παρακάτω ενότητες." #: reference/import.rst:43 msgid "" -"The import system has been updated to fully implement the second phase " -"of :pep:`302`. There is no longer any implicit import machinery - the full " +"The import system has been updated to fully implement the second phase of :" +"pep:`302`. There is no longer any implicit import machinery - the full " "import system is exposed through :data:`sys.meta_path`. In addition, native " "namespace package support has been implemented (see :pep:`420`)." msgstr "" "Το σύστημα εισαγωγής έχει ενημερωθεί ώστε να υλοποιεί πλήρως τη δεύτερη φάση " "του :pep:`302`. Δεν υπάρχει πλέον κανένας έμμεσος μηχανισμός εισαγωγής - ο " "πλήρης μηχανισμός εισαγωγής εκτίθεται μέσω του :data:`sys.meta_path`. " -"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages " -"(βλ. :pep:`420`)." +"Επιπλέον, έχει υλοποιηθεί εγγενής υποστήριξη για namespace packages (βλ. :" +"pep:`420`)." #: reference/import.rst:51 msgid ":mod:`importlib`" @@ -193,8 +190,8 @@ msgstr "" "το όνομα του γονικού package με τελεία, αντίστοιχα με τη συνηθισμένη σύνταξη " "πρόσβασης σε χαρακτηριστικά στην Python. Έτσι, μπορεί να έχετε ένα package " "με όνομα :mod:`email`, το οποίο με τη σειρά του έχει ένα subpackage με " -"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με " -"όνομα :mod:`email.mime.text`." +"όνομα :mod:`email.mime` και ένα module μέσα σε αυτό το subpackage με όνομα :" +"mod:`email.mime.text`." #: reference/import.rst:93 msgid "Regular packages" @@ -206,11 +203,11 @@ msgid "" "package>` and :term:`namespace packages `. Regular " "packages are traditional packages as they existed in Python 3.2 and earlier. " "A regular package is typically implemented as a directory containing an " -"``__init__.py`` file. When a regular package is imported, this " -"``__init__.py`` file is implicitly executed, and the objects it defines are " -"bound to names in the package's namespace. The ``__init__.py`` file can " -"contain the same Python code that any other module can contain, and Python " -"will add some additional attributes to the module when it is imported." +"``__init__.py`` file. When a regular package is imported, this ``__init__." +"py`` file is implicitly executed, and the objects it defines are bound to " +"names in the package's namespace. The ``__init__.py`` file can contain the " +"same Python code that any other module can contain, and Python will add some " +"additional attributes to the module when it is imported." msgstr "" "Η Python ορίζει δύο τύπους packages: τα :term:`regular packages ` και τα :term:`namespace packages `. Τα regular " @@ -338,24 +335,24 @@ msgstr "" "Για να ξεκινήσει η αναζήτηση, η Python χρειάζεται το :term:`πλήρως " "αναγνωρισμένο ` όνομα του module (ή του πακέτου, αλλά για " "τους σκοπούς αυτής της συζήτησης η διαφορά δεν έχει σημασία) που εισάγεται. " -"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της " -"δήλωσης :keyword:`import` ή από τις παραμέτρους των " -"συναρτήσεων :func:`importlib.import_module` ή :func:`__import__`." +"Αυτό το όνομα μπορεί να προέρχεται από διάφορα ορίσματα της δήλωσης :keyword:" +"`import` ή από τις παραμέτρους των συναρτήσεων :func:`importlib." +"import_module` ή :func:`__import__`." #: reference/import.rst:168 msgid "" "This name will be used in various phases of the import search, and it may be " "the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python " -"first tries to import ``foo``, then ``foo.bar``, and finally " -"``foo.bar.baz``. If any of the intermediate imports fail, " -"a :exc:`ModuleNotFoundError` is raised." +"first tries to import ``foo``, then ``foo.bar``, and finally ``foo.bar." +"baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " +"is raised." msgstr "" "Αυτό το όνομα θα χρησιμοποιηθεί σε διάφορες φάσεις της αναζήτησης import και " -"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. " -"``foo.bar.baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει " -"το ``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " -"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise " -"η :exc:`ModuleNotFoundError`." +"μπορεί να είναι μια διαδρομή με τελείες προς ένα submodule, π.χ. ``foo.bar." +"baz``. Σε αυτή την περίπτωση, η Python πρώτα προσπαθεί να εισάγει το " +"``foo``, μετά το ``foo.bar`` και τέλος το ``foo.bar.baz``. Αν αποτύχει " +"κάποιες από τις ενδιάμεσες εισαγωγές, γίνεται raise η :exc:" +"`ModuleNotFoundError`." #: reference/import.rst:175 msgid "The module cache" @@ -370,21 +367,20 @@ msgid "" "and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" -"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι " -"το :data:`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη " -"όλων των modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των " -"ενδιάμεσων διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί " -"προηγουμένως, το :data:`sys.modules` θα περιέχει εγγραφές για τα ``foo``, " -"``foo.bar`` και ``foo.bar.baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο " -"αντικείμενο module." +"Το πρώτο σημείο που ελέγχεται κατά την αναζήτηση εισαγωγής είναι το :data:" +"`sys.modules`. Αυτή η αντιστοίχιση λειτουργεί ως προσωρινή μνήμη όλων των " +"modules που έχουν εισαχθεί στο παρελθόν, συμπεριλαμβανομένων των ενδιάμεσων " +"διαδρομών. Έτσι, αν το ``foo.bar.baz`` είχε εισαχθεί προηγουμένως, το :data:" +"`sys.modules` θα περιέχει εγγραφές για τα ``foo``, ``foo.bar`` και ``foo.bar." +"baz``. Κάθε κλειδί θα έχει ως τιμή το αντίστοιχο αντικείμενο module." #: reference/import.rst:187 msgid "" "During import, the module name is looked up in :data:`sys.modules` and if " "present, the associated value is the module satisfying the import, and the " -"process completes. However, if the value is ``None``, then " -"a :exc:`ModuleNotFoundError` is raised. If the module name is missing, " -"Python will continue searching for the module." +"process completes. However, if the value is ``None``, then a :exc:" +"`ModuleNotFoundError` is raised. If the module name is missing, Python will " +"continue searching for the module." msgstr "" "Κατά την εισαγωγή, το όνομα του module αναζητείται στο :data:`sys.modules` " "και, αν υπάρχει, η συσχετισμένη τιμή είναι το module που ικανοποιεί την " @@ -398,24 +394,24 @@ msgid "" "associated module (as other modules may hold references to it), but it will " "invalidate the cache entry for the named module, causing Python to search " "anew for the named module upon its next import. The key can also be assigned " -"to ``None``, forcing the next import of the module to result in " -"a :exc:`ModuleNotFoundError`." +"to ``None``, forcing the next import of the module to result in a :exc:" +"`ModuleNotFoundError`." msgstr "" "Το :data:`sys.modules` είναι εγγράψιμο. Η διαγραφή ενός κλειδιού μπορεί να " "μην καταστρέψει το αντίστοιχο module (καθώς άλλα modules μπορεί να κρατούν " "αναφορές σε αυτό), αλλά θα ακυρώσει την εγγραφή της προσωρινής μνήμης για το " "module με το συγκεκριμένο όνομα, προκαλώντας την Python να το αναζητήσει " "ξανά στην επόμενο εισαγωγή. Το κλειδί μπορεί επίσης να οριστεί σε ``None``, " -"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει " -"σε :exc:`ModuleNotFoundError`." +"αναγκάζοντας την επόμενο εισαγωγή του module να καταλήξει σε :exc:" +"`ModuleNotFoundError`." #: reference/import.rst:200 msgid "" "Beware though, as if you keep a reference to the module object, invalidate " "its cache entry in :data:`sys.modules`, and then re-import the named module, " -"the two module objects will *not* be the same. By " -"contrast, :func:`importlib.reload` will reuse the *same* module object, and " -"simply reinitialise the module contents by rerunning the module's code." +"the two module objects will *not* be the same. By contrast, :func:`importlib." +"reload` will reuse the *same* module object, and simply reinitialise the " +"module contents by rerunning the module's code." msgstr "" "Προσοχή όμως: αν κρατήσετε μια αναφορά στο αντικείμενο module, ακυρώσετε την " "εγγραφή του στην προσωρινή μνήμη του :data:`sys.modules` και μετά ξανακάνετε " @@ -432,12 +428,12 @@ msgstr "Finders και loaders" msgid "" "If the named module is not found in :data:`sys.modules`, then Python's " "import protocol is invoked to find and load the module. This protocol " -"consists of two conceptual objects, :term:`finders ` " -"and :term:`loaders `. A finder's job is to determine whether it can " -"find the named module using whatever strategy it knows about. Objects that " -"implement both of these interfaces are referred to as :term:`importers " -"` - they return themselves when they find that they can load the " -"requested module." +"consists of two conceptual objects, :term:`finders ` and :term:" +"`loaders `. A finder's job is to determine whether it can find the " +"named module using whatever strategy it knows about. Objects that implement " +"both of these interfaces are referred to as :term:`importers ` - " +"they return themselves when they find that they can load the requested " +"module." msgstr "" "Αν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "τότε ενεργοποιείται το πρωτόκολλο εισαγωγής της Python για να βρεθεί και να " @@ -504,10 +500,10 @@ msgid "" "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" -"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν " -"απευθείας :term:`loaders `, ενώ τώρα επιστρέφουν module specs που " -"*περιέχουν* loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την " -"εισαγωγή, αλλά έχουν λιγότερες ευθύνες." +"Σε παλαιότερες εκδόσεις της Python, οι finders επέστρεφαν απευθείας :term:" +"`loaders `, ενώ τώρα επιστρέφουν module specs που *περιέχουν* " +"loaders. Οι loaders εξακολουθούν να χρησιμοποιούνται κατά την εισαγωγή, αλλά " +"έχουν λιγότερες ευθύνες." #: reference/import.rst:249 msgid "Import hooks" @@ -540,16 +536,15 @@ msgstr "" #: reference/import.rst:269 msgid "" -"Import path hooks are called as part of :data:`sys.path` (or " -"``package.__path__``) processing, at the point where their associated path " -"item is encountered. Import path hooks are registered by adding new " -"callables to :data:`sys.path_hooks` as described below." +"Import path hooks are called as part of :data:`sys.path` (or ``package." +"__path__``) processing, at the point where their associated path item is " +"encountered. Import path hooks are registered by adding new callables to :" +"data:`sys.path_hooks` as described below." msgstr "" -"Τα import path hooks καλούνται ως μέρος της επεξεργασίας " -"του :data:`sys.path` (ή του ``package.__path__``), στο σημείο όπου " -"συναντάται το αντίστοιχο στοιχείο διαδρομής. Τα import path hooks " -"καταχωρίζονται προσθέτοντας νέα callables στο :data:`sys.path_hooks`, όπως " -"περιγράφεται παρακάτω." +"Τα import path hooks καλούνται ως μέρος της επεξεργασίας του :data:`sys." +"path` (ή του ``package.__path__``), στο σημείο όπου συναντάται το αντίστοιχο " +"στοιχείο διαδρομής. Τα import path hooks καταχωρίζονται προσθέτοντας νέα " +"callables στο :data:`sys.path_hooks`, όπως περιγράφεται παρακάτω." #: reference/import.rst:276 msgid "The meta path" @@ -560,21 +555,21 @@ msgid "" "When the named module is not found in :data:`sys.modules`, Python next " "searches :data:`sys.meta_path`, which contains a list of meta path finder " "objects. These finders are queried in order to see if they know how to " -"handle the named module. Meta path finders must implement a method " -"called :meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three " -"arguments: a name, an import path, and (optionally) a target module. The " -"meta path finder can use any strategy it wants to determine whether it can " -"handle the named module or not." +"handle the named module. Meta path finders must implement a method called :" +"meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments: " +"a name, an import path, and (optionally) a target module. The meta path " +"finder can use any strategy it wants to determine whether it can handle the " +"named module or not." msgstr "" "Όταν το module με το συγκεκριμένο όνομα δεν βρεθεί στο :data:`sys.modules`, " "η Python στη συνέχεια το αναζητά στο :data:`sys.meta_path`, το οποίο " "περιέχει μια λίστα από meta path finder αντικείμενα. Αυτοί οι finders " "ερωτώνται με τη σειρά για να διαπιστωθεί αν γνωρίζουν πώς να χειριστούν το " -"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με " -"όνομα :meth:`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία " -"ορίσματα: ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο " -"meta path finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για " -"να καθορίσει αν μπορεί να χειριστεί το module ή όχι." +"module. Οι meta path finders πρέπει να υλοποιούν μια μέθοδο με όνομα :meth:" +"`~importlib.abc.MetaPathFinder.find_spec`, η οποία λαμβάνει τρία ορίσματα: " +"ένα όνομα, ένα import path και (προαιρετικά) ένα target module. Ο meta path " +"finder μπορεί να χρησιμοποιήσει οποιαδήποτε στρατηγική θέλει για να " +"καθορίσει αν μπορεί να χειριστεί το module ή όχι." #: reference/import.rst:291 msgid "" @@ -611,10 +606,10 @@ msgstr "" "την αναζήτηση του module. Για modules ανωτέρου επιπέδου, το δεύτερο όρισμα " "είναι ``None``, αλλά για submodules ή subpackages, είναι η τιμή του " "χαρακτηριστικού ``__path__`` του γονικού πακέτου. Αν δεν είναι δυνατή η " -"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise " -"το :exc:`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο " -"module που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα " -"εισαγωγής περνά target module μόνο κατά την επαναφόρτωση." +"πρόσβαση στο κατάλληλο ``__path__``, γίνεται raise το :exc:" +"`ModuleNotFoundError`. Το τρίτο όρισμα είναι ένα υπάρχον αντικείμενο module " +"που θα αποτελέσει αργότερα τον στόχο της φόρτωσης. Το σύστημα εισαγωγής " +"περνά target module μόνο κατά την επαναφόρτωση." #: reference/import.rst:308 msgid "" @@ -623,21 +618,19 @@ msgid "" "importing ``foo.bar.baz`` will first perform a top level import, calling " "``mpf.find_spec(\"foo\", None, None)`` on each meta path finder (``mpf``). " "After ``foo`` has been imported, ``foo.bar`` will be imported by traversing " -"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", " -"foo.__path__, None)``. Once ``foo.bar`` has been imported, the final " -"traversal will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " -"None)``." +"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", foo." +"__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " +"will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." msgstr "" "Το meta path μπορεί να διασχιστεί πολλές φορές για ένα μόνο αίτημα " "εισαγωγής. Για παράδειγμα, υποθέτοντας ότι κανένα από τα εμπλεκόμενα modules " "δεν έχει ήδη προστεθεί στην προσωρινή μνήμη, η εισαγωγή του ``foo.bar.baz`` " -"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το " -"``mpf.find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). " -"Αφού εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta " -"path για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", " -"foo.__path__, None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική " -"διάσχιση θα καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " -"None)``." +"θα εκτελέσει πρώτα μία εισαγωγή ανωτέρου επιπέδου, καλώντας το ``mpf." +"find_spec(\"foo\", None, None)`` σε κάθε meta path finder (``mpf``). Αφού " +"εισαχθεί το ``foo``, το ``foo.bar`` θα εισαχθεί διασχίζοντας το meta path " +"για δεύτερη φορά, καλώντας την ``mpf.find_spec(\"foo.bar\", foo.__path__, " +"None)``. Μόλις γίνει η εισαγωγή του ``foo.bar``, η τελική διάσχιση θα " +"καλέσει το ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." #: reference/import.rst:318 msgid "" @@ -667,30 +660,30 @@ msgid "" "The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path " "finders replaced :meth:`!find_module`, which is now deprecated. While it " "will continue to work without change, the import machinery will try it only " -"if the finder does not " -"implement :meth:`~importlib.abc.MetaPathFinder.find_spec`." +"if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." +"find_spec`." msgstr "" "Η μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` των meta path " "finders αντικατέστησε τη :meth:`!find_module`, η οποία πλέον χαρακτηριστεί " "ως απαρχαιωμένη. Αν και θα συνεχίσει να λειτουργεί χωρίς αλλαγές, ο " -"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί " -"τη :meth:`~importlib.abc.MetaPathFinder.find_spec`." +"μηχανισμός εισαγωγής θα τη δοκιμάζει μόνο αν ο finder δεν υλοποιεί τη :meth:" +"`~importlib.abc.MetaPathFinder.find_spec`." #: reference/import.rst:334 msgid "" -"Use of :meth:`!find_module` by the import system now " -"raises :exc:`ImportWarning`." +"Use of :meth:`!find_module` by the import system now raises :exc:" +"`ImportWarning`." msgstr "" "Η χρήση της :meth:`!find_module` από το σύστημα εισαγωγής πλέον κάνει raise " "την :exc:`ImportWarning`." #: reference/import.rst:338 msgid "" -":meth:`!find_module` has been removed. " -"Use :meth:`~importlib.abc.MetaPathFinder.find_spec` instead." +":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." +"MetaPathFinder.find_spec` instead." msgstr "" -"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε " -"την :meth:`~importlib.abc.MetaPathFinder.find_spec` στη θέση της." +"Η :meth:`!find_module` έχει αφαιρεθεί. Χρησιμοποιήστε την :meth:`~importlib." +"abc.MetaPathFinder.find_spec` στη θέση της." #: reference/import.rst:344 msgid "Loading" @@ -772,11 +765,11 @@ msgstr "Σημειώστε τις ακόλουθες λεπτομέρειες:" #: reference/import.rst:381 msgid "" -"If there is an existing module object with the given name " -"in :data:`sys.modules`, import will have already returned it." +"If there is an existing module object with the given name in :data:`sys." +"modules`, import will have already returned it." msgstr "" -"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα " -"στο :data:`sys.modules`, το import θα το έχει ήδη επιστρέψει." +"Αν υπάρχει ήδη ένα αντικείμενο module με το συγκεκριμένο όνομα στο :data:" +"`sys.modules`, το import θα το έχει ήδη επιστρέψει." #: reference/import.rst:384 msgid "" @@ -788,17 +781,17 @@ msgid "" msgstr "" "Το module θα υπάρχει στο :data:`sys.modules` πριν ο loader εκτελέσει τον " "κώδικα του module. Αυτό είναι κρίσιμο, επειδή ο κώδικας του module μπορεί " -"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του " -"στο :data:`sys.modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη " -"χειρότερη περίπτωση και πολλαπλή φόρτωση στην καλύτερη." +"(άμεσα ή έμμεσα) να εισάγει τον εαυτό του· η προσθήκη του στο :data:`sys." +"modules` εκ των προτέρων αποτρέπει ατέρμονη αναδρομή στη χειρότερη περίπτωση " +"και πολλαπλή φόρτωση στην καλύτερη." #: reference/import.rst:390 msgid "" "If loading fails, the failing module -- and only the failing module -- gets " -"removed from :data:`sys.modules`. Any module already in " -"the :data:`sys.modules` cache, and any module that was successfully loaded " -"as a side-effect, must remain in the cache. This contrasts with reloading " -"where even the failing module is left in :data:`sys.modules`." +"removed from :data:`sys.modules`. Any module already in the :data:`sys." +"modules` cache, and any module that was successfully loaded as a side-" +"effect, must remain in the cache. This contrasts with reloading where even " +"the failing module is left in :data:`sys.modules`." msgstr "" "Αν η φόρτωση αποτύχει, το module που απέτυχε -- και μόνο αυτό -- αφαιρείται " "από το :data:`sys.modules`. Οποιοδήποτε module βρίσκεται ήδη στην προσωρινή " @@ -840,12 +833,12 @@ msgstr "" #: reference/import.rst:408 msgid "" "The import system has taken over the boilerplate responsibilities of " -"loaders. These were previously performed by " -"the :meth:`importlib.abc.Loader.load_module` method." +"loaders. These were previously performed by the :meth:`importlib.abc.Loader." +"load_module` method." msgstr "" "Το σύστημα εισαγωγής έχει αναλάβει τις τυποποιημένες ευθύνες των loaders. " -"Αυτές εκτελούνταν παλαιότερα από τη " -"μέθοδο :meth:`importlib.abc.Loader.load_module`." +"Αυτές εκτελούνταν παλαιότερα από τη μέθοδο :meth:`importlib.abc.Loader." +"load_module`." #: reference/import.rst:414 msgid "Loaders" @@ -859,10 +852,10 @@ msgid "" "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" "Οι module loaders παρέχουν την κρίσιμη λειτουργία της φόρτωσης: την εκτέλεση " -"του module. Ο μηχανισμός εισαγωγής καλεί τη " -"μέθοδο :meth:`importlib.abc.Loader.exec_module` με ένα μόνο όρισμα, το " -"αντικείμενο module που θα εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει " -"η :meth:`~importlib.abc.Loader.exec_module` αγνοείται." +"του module. Ο μηχανισμός εισαγωγής καλεί τη μέθοδο :meth:`importlib.abc." +"Loader.exec_module` με ένα μόνο όρισμα, το αντικείμενο module που θα " +"εκτελεστεί. Οποιαδήποτε τιμή επιστρέφει η :meth:`~importlib.abc.Loader." +"exec_module` αγνοείται." #: reference/import.rst:421 msgid "Loaders must satisfy the following requirements:" @@ -880,13 +873,13 @@ msgstr "" #: reference/import.rst:427 msgid "" -"If the loader cannot execute the module, it should raise " -"an :exc:`ImportError`, although any other exception raised " -"during :meth:`~importlib.abc.Loader.exec_module` will be propagated." +"If the loader cannot execute the module, it should raise an :exc:" +"`ImportError`, although any other exception raised during :meth:`~importlib." +"abc.Loader.exec_module` will be propagated." msgstr "" -"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise " -"το :exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά " -"τη :meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." +"Αν ο loader δεν μπορεί να εκτελέσει το module, θα πρέπει να κάνει raise το :" +"exc:`ImportError`, αν και οποιαδήποτε άλλη εξαίρεση γίνει raise κατά τη :" +"meth:`~importlib.abc.Loader.exec_module` θα προωθηθεί προς τα πάνω." #: reference/import.rst:431 msgid "" @@ -895,9 +888,9 @@ msgid "" "a spec with the loader set to ``self``." msgstr "" "Σε πολλές περιπτώσεις, ο finder και ο loader μπορεί να είναι το ίδιο " -"αντικείμενο· σε αυτές τις περιπτώσεις, η " -"μέθοδος :meth:`~importlib.abc.MetaPathFinder.find_spec` απλώς θα επιστρέψει " -"ένα spec με τον loader ορισμένο σε ``self``." +"αντικείμενο· σε αυτές τις περιπτώσεις, η μέθοδος :meth:`~importlib.abc." +"MetaPathFinder.find_spec` απλώς θα επιστρέψει ένα spec με τον loader " +"ορισμένο σε ``self``." #: reference/import.rst:435 msgid "" @@ -909,12 +902,12 @@ msgid "" "will create the new module itself." msgstr "" "Οι module loaders μπορούν, προαιρετικά, να δημιουργούν το αντικείμενο module " -"κατά τη φόρτωση υλοποιώντας μια " -"μέθοδο :meth:`~importlib.abc.Loader.create_module`. Παίρνει ένα όρισμα, το " -"module spec, και επιστρέφει το νέο αντικείμενο module που θα χρησιμοποιηθεί " -"κατά τη φόρτωση. Η ``create_module()`` δεν χρειάζεται να ορίσει " -"χαρακτηριστικά στο αντικείμενο module. Αν η μέθοδος επιστρέψει ``None``, ο " -"μηχανισμός εισαγωγής θα δημιουργήσει ο ίδιος το νέο module." +"κατά τη φόρτωση υλοποιώντας μια μέθοδο :meth:`~importlib.abc.Loader." +"create_module`. Παίρνει ένα όρισμα, το module spec, και επιστρέφει το νέο " +"αντικείμενο module που θα χρησιμοποιηθεί κατά τη φόρτωση. Η " +"``create_module()`` δεν χρειάζεται να ορίσει χαρακτηριστικά στο αντικείμενο " +"module. Αν η μέθοδος επιστρέψει ``None``, ο μηχανισμός εισαγωγής θα " +"δημιουργήσει ο ίδιος το νέο module." #: reference/import.rst:442 msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." @@ -922,13 +915,13 @@ msgstr "Η μέθοδος :meth:`~importlib.abc.Loader.create_module` των loa #: reference/import.rst:445 msgid "" -"The :meth:`~importlib.abc.Loader.load_module` method was replaced " -"by :meth:`~importlib.abc.Loader.exec_module` and the import machinery " -"assumed all the boilerplate responsibilities of loading." +"The :meth:`~importlib.abc.Loader.load_module` method was replaced by :meth:" +"`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " +"boilerplate responsibilities of loading." msgstr "" -"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από " -"την :meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής " -"ανέλαβε όλες τις τυποποιημένες ευθύνες της φόρτωσης." +"Η μέθοδος :meth:`~importlib.abc.Loader.load_module` αντικαταστάθηκε από την :" +"meth:`~importlib.abc.Loader.exec_module` και ο μηχανισμός εισαγωγής ανέλαβε " +"όλες τις τυποποιημένες ευθύνες της φόρτωσης." #: reference/import.rst:450 msgid "" @@ -954,16 +947,16 @@ msgstr "" #: reference/import.rst:459 msgid "" -"If there is an existing module object with the given name " -"in :data:`sys.modules`, the loader must use that existing module. " -"(Otherwise, :func:`importlib.reload` will not work correctly.) If the named " -"module does not exist in :data:`sys.modules`, the loader must create a new " -"module object and add it to :data:`sys.modules`." +"If there is an existing module object with the given name in :data:`sys." +"modules`, the loader must use that existing module. (Otherwise, :func:" +"`importlib.reload` will not work correctly.) If the named module does not " +"exist in :data:`sys.modules`, the loader must create a new module object and " +"add it to :data:`sys.modules`." msgstr "" -"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα " -"στο :data:`sys.modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον " -"module. (Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) " -"Αν το module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " +"Αν υπάρχει ήδη αντικείμενο module με το συγκεκριμένο όνομα στο :data:`sys." +"modules`, ο loader πρέπει να χρησιμοποιήσει αυτό το υπάρχον module. " +"(Διαφορετικά, η :func:`importlib.reload` δεν θα λειτουργεί σωστά.) Αν το " +"module με το συγκεκριμένο όνομα δεν υπάρχει στο :data:`sys.modules`, ο " "loader πρέπει να δημιουργήσει νέο αντικείμενο module και να το προσθέσει " "στο :data:`sys.modules`." @@ -978,9 +971,9 @@ msgstr "" #: reference/import.rst:469 msgid "" -"If loading fails, the loader must remove any modules it has inserted " -"into :data:`sys.modules`, but it must remove **only** the failing module(s), " -"and only if the loader itself has loaded the module(s) explicitly." +"If loading fails, the loader must remove any modules it has inserted into :" +"data:`sys.modules`, but it must remove **only** the failing module(s), and " +"only if the loader itself has loaded the module(s) explicitly." msgstr "" "Αν η φόρτωση αποτύχει, ο loader πρέπει να αφαιρέσει οποιαδήποτε modules έχει " "εισάγει στο :data:`sys.modules`, αλλά πρέπει να αφαιρέσει **μόνο** το/τα " @@ -1072,9 +1065,9 @@ msgstr "" msgid "" "Given Python's familiar name binding rules this might seem surprising, but " "it's actually a fundamental feature of the import system. The invariant " -"holding is that if you have ``sys.modules['spam']`` and " -"``sys.modules['spam.foo']`` (as you would after the above import), the " -"latter must appear as the ``foo`` attribute of the former." +"holding is that if you have ``sys.modules['spam']`` and ``sys.modules['spam." +"foo']`` (as you would after the above import), the latter must appear as the " +"``foo`` attribute of the former." msgstr "" "Με δεδομένους τους γνώριμους κανόνες δέσμευσης ονομάτων της Python, αυτό " "μπορεί να φαίνεται παράξενο, αλλά στην πραγματικότητα είναι θεμελιώδες " @@ -1118,8 +1111,8 @@ msgstr "" msgid "" "The module's spec is exposed as :attr:`module.__spec__`. Setting :attr:`!" "__spec__` appropriately applies equally to :ref:`modules initialized during " -"interpreter startup `. The one exception is ``__main__``, " -"where :attr:`!__spec__` is :ref:`set to None in some cases `." +"interpreter startup `. The one exception is ``__main__``, where :" +"attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" "Το spec του module εκτίθεται ως :attr:`module.__spec__`. Η κατάλληλη ρύθμιση " "του :attr:`!__spec__` ισχύει εξίσου για :ref:`modules που αρχικοποιούνται " @@ -1141,10 +1134,10 @@ msgstr "Χαρακτηριστικά __path__ στα modules" #: reference/import.rst:550 msgid "" -"The :attr:`~module.__path__` attribute should be a (possibly " -"empty) :term:`sequence` of strings enumerating the locations where the " -"package's submodules will be found. By definition, if a module has a :attr:`!" -"__path__` attribute, it is a :term:`package`." +"The :attr:`~module.__path__` attribute should be a (possibly empty) :term:" +"`sequence` of strings enumerating the locations where the package's " +"submodules will be found. By definition, if a module has a :attr:`!__path__` " +"attribute, it is a :term:`package`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` θα πρέπει να είναι μια " "(ενδεχομένως κενή) :term:`sequence` από συμβολοσειρές που απαριθμούν τις " @@ -1154,10 +1147,10 @@ msgstr "" #: reference/import.rst:555 msgid "" "A package's :attr:`~module.__path__` attribute is used during imports of its " -"subpackages. Within the import machinery, it functions much the same " -"as :data:`sys.path`, i.e. providing a list of locations to search for " -"modules during import. However, :attr:`!__path__` is typically much more " -"constrained than :data:`!sys.path`." +"subpackages. Within the import machinery, it functions much the same as :" +"data:`sys.path`, i.e. providing a list of locations to search for modules " +"during import. However, :attr:`!__path__` is typically much more constrained " +"than :data:`!sys.path`." msgstr "" "Το χαρακτηριστικό :attr:`~module.__path__` ενός πακέτου χρησιμοποιείται κατά " "την εισαγωγή των subpackages του. Μέσα στον μηχανισμό εισαγωγής, λειτουργεί " @@ -1178,21 +1171,20 @@ msgstr "" #: reference/import.rst:566 msgid "" -"A package's ``__init__.py`` file may set or alter the " -"package's :attr:`~module.__path__` attribute, and this was typically the way " -"namespace packages were implemented prior to :pep:`420`. With the adoption " -"of :pep:`420`, namespace packages no longer need to supply ``__init__.py`` " -"files containing only :attr:`!__path__` manipulation code; the import " -"machinery automatically sets :attr:`!__path__` correctly for the namespace " -"package." +"A package's ``__init__.py`` file may set or alter the package's :attr:" +"`~module.__path__` attribute, and this was typically the way namespace " +"packages were implemented prior to :pep:`420`. With the adoption of :pep:" +"`420`, namespace packages no longer need to supply ``__init__.py`` files " +"containing only :attr:`!__path__` manipulation code; the import machinery " +"automatically sets :attr:`!__path__` correctly for the namespace package." msgstr "" "Το αρχείο ``__init__.py`` ενός πακέτου μπορεί να ορίζει ή να τροποποιεί το " "χαρακτηριστικό :attr:`~module.__path__` του πακέτου, και αυτός ήταν συνήθως " "ο τρόπος με τον οποίο υλοποιούνταν τα namespace πακέτα πριν το :pep:`420`. " "Με την υιοθέτηση του :pep:`420`, τα namespace πακέτα δεν χρειάζεται πλέον να " -"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού " -"του :attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά " -"το :attr:`!__path__` για το namespace πακέτο." +"παρέχουν αρχεία ``__init__.py`` που περιέχουν μόνο κώδικα χειρισμού του :" +"attr:`!__path__`· ο μηχανισμός εισαγωγής ορίζει αυτόματα σωστά το :attr:`!" +"__path__` για το namespace πακέτο." #: reference/import.rst:575 msgid "Module reprs" @@ -1213,9 +1205,9 @@ msgid "" "If the module has a spec (``__spec__``), the import machinery will try to " "generate a repr from it. If that fails or there is no spec, the import " "system will craft a default repr using whatever information is available on " -"the module. It will try to use the ``module.__name__``, " -"``module.__file__``, and ``module.__loader__`` as input into the repr, with " -"defaults for whatever information is missing." +"the module. It will try to use the ``module.__name__``, ``module." +"__file__``, and ``module.__loader__`` as input into the repr, with defaults " +"for whatever information is missing." msgstr "" "Αν το module έχει spec (``__spec__``), ο μηχανισμός εισαγωγής θα προσπαθήσει " "να παράγει repr από αυτό. Αν αυτό αποτύχει ή δεν υπάρχει spec, το σύστημα " @@ -1296,14 +1288,14 @@ msgstr "" msgid "" "Python also supports \"hash-based\" cache files, which store a hash of the " "source file's contents rather than its metadata. There are two variants of " -"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based " -"``.pyc`` files, Python validates the cache file by hashing the source file " -"and comparing the resulting hash with the hash in the cache file. If a " -"checked hash-based cache file is found to be invalid, Python regenerates it " -"and writes a new checked hash-based cache file. For unchecked hash-based " -"``.pyc`` files, Python simply assumes the cache file is valid if it exists. " -"Hash-based ``.pyc`` files validation behavior may be overridden with " -"the :option:`--check-hash-based-pycs` flag." +"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based ``." +"pyc`` files, Python validates the cache file by hashing the source file and " +"comparing the resulting hash with the hash in the cache file. If a checked " +"hash-based cache file is found to be invalid, Python regenerates it and " +"writes a new checked hash-based cache file. For unchecked hash-based ``." +"pyc`` files, Python simply assumes the cache file is valid if it exists. " +"Hash-based ``.pyc`` files validation behavior may be overridden with the :" +"option:`--check-hash-based-pycs` flag." msgstr "" "Η Python υποστηρίζει επίσης αρχεία προσωρινής μνήμης βασισμένα σε hash, τα " "οποία αποθηκεύουν ένα hash του περιεχομένου του πηγαίου αρχείου αντί για τα " @@ -1334,17 +1326,17 @@ msgstr "Finder βασισμένος στη διαδρομή" #: reference/import.rst:641 msgid "" "As mentioned previously, Python comes with several default meta path " -"finders. One of these, called the :term:`path based finder` " -"(:class:`~importlib.machinery.PathFinder`), searches an :term:`import path`, " -"which contains a list of :term:`path entries `. Each path entry " -"names a location to search for modules." +"finders. One of these, called the :term:`path based finder` (:class:" +"`~importlib.machinery.PathFinder`), searches an :term:`import path`, which " +"contains a list of :term:`path entries `. Each path entry names " +"a location to search for modules." msgstr "" "Όπως αναφέρθηκε προηγουμένως, η Python συνοδεύεται από αρκετούς " -"προεπιλεγμένους meta path finders. Ένας από αυτούς, που " -"ονομάζεται :term:`path based finder` " -"(:class:`~importlib.machinery.PathFinder`), αναζητά σε ένα :term:`import " -"path`, το οποίο περιέχει μια λίστα από :term:`path entries `. " -"Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν modules." +"προεπιλεγμένους meta path finders. Ένας από αυτούς, που ονομάζεται :term:" +"`path based finder` (:class:`~importlib.machinery.PathFinder`), αναζητά σε " +"ένα :term:`import path`, το οποίο περιέχει μια λίστα από :term:`path entries " +"`. Κάθε path entry ονομάζει μια τοποθεσία όπου θα αναζητηθούν " +"modules." #: reference/import.rst:647 msgid "" @@ -1362,16 +1354,16 @@ msgid "" "The default set of path entry finders implement all the semantics for " "finding modules on the file system, handling special file types such as " "Python source code (``.py`` files), Python byte code (``.pyc`` files) and " -"shared libraries (e.g. ``.so`` files). When supported by " -"the :mod:`zipimport` module in the standard library, the default path entry " -"finders also handle loading all of these file types (other than shared " -"libraries) from zipfiles." +"shared libraries (e.g. ``.so`` files). When supported by the :mod:" +"`zipimport` module in the standard library, the default path entry finders " +"also handle loading all of these file types (other than shared libraries) " +"from zipfiles." msgstr "" "Το προεπιλεγμένο σύνολο finders καταχώρησης διαδρομής υλοποιεί όλη τη " "σημασιολογία για την εύρεση των modules στο σύστημα αρχείων, χειριζόμενο " "ειδικούς τύπους αρχείων όπως πηγαίο κώδικα Python (αρχεία ``.py``), byte " -"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία " -"``.so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " +"code Python (αρχεία ``.pyc``) και κοινόχρηστες βιβλιοθήκες (π.χ. αρχεία ``." +"so``). Όταν υποστηρίζεται από το module :mod:`zipimport` της τυπικής " "βιβλιοθήκης, οι προεπιλεγμένοι finders καταχώρησης διαδρομής χειρίζονται " "επίσης τη φόρτωση όλων αυτών των τύπων αρχείων (εκτός από κοινόχρηστες " "βιβλιοθήκες) από zipfiles." @@ -1409,8 +1401,8 @@ msgstr "" #: reference/import.rst:670 msgid "" "A word of warning: this section and the previous both use the term *finder*, " -"distinguishing between them by using the terms :term:`meta path finder` " -"and :term:`path entry finder`. These two types of finders are very similar, " +"distinguishing between them by using the terms :term:`meta path finder` and :" +"term:`path entry finder`. These two types of finders are very similar, " "support similar protocols, and function in similar ways during the import " "process, but it's important to keep in mind that they are subtly different. " "In particular, meta path finders operate at the beginning of the import " @@ -1422,8 +1414,8 @@ msgstr "" "παρόμοιοι, υποστηρίζουν παρόμοια πρωτόκολλα και λειτουργούν με παρόμοιο " "τρόπο κατά τη διαδικασία εισαγωγής, αλλά είναι σημαντικό να θυμάστε ότι " "έχουν λεπτές διαφορές. Συγκεκριμένα, οι meta path finders λειτουργούν στην " -"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση " -"του :data:`sys.meta_path`." +"αρχή της διαδικασίας εισαγωγής, όπως καθορίζεται από τη διάσχιση του :data:" +"`sys.meta_path`." #: reference/import.rst:678 msgid "" @@ -1456,30 +1448,29 @@ msgstr "" #: reference/import.rst:698 msgid "" -"As a meta path finder, the :term:`path based finder` implements " -"the :meth:`~importlib.abc.MetaPathFinder.find_spec` protocol previously " -"described, however it exposes additional hooks that can be used to customize " -"how modules are found and loaded from the :term:`import path`." +"As a meta path finder, the :term:`path based finder` implements the :meth:" +"`~importlib.abc.MetaPathFinder.find_spec` protocol previously described, " +"however it exposes additional hooks that can be used to customize how " +"modules are found and loaded from the :term:`import path`." msgstr "" -"Ως meta path finder, ο :term:`path based finder` υλοποιεί το " -"πρωτόκολλο :meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε " -"προηγουμένως, ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν " -"για να προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από " -"το :term:`import path`." +"Ως meta path finder, ο :term:`path based finder` υλοποιεί το πρωτόκολλο :" +"meth:`~importlib.abc.MetaPathFinder.find_spec` που περιγράφηκε προηγουμένως, " +"ωστόσο εκθέτει επιπλέον hooks που μπορούν να χρησιμοποιηθούν για να " +"προσαρμόσετε το πώς βρίσκονται και φορτώνονται modules από το :term:`import " +"path`." #: reference/import.rst:703 msgid "" -"Three variables are used by the :term:`path based " -"finder`, :data:`sys.path`, :data:`sys.path_hooks` " -"and :data:`sys.path_importer_cache`. The ``__path__`` attributes on package " -"objects are also used. These provide additional ways that the import " -"machinery can be customized." +"Three variables are used by the :term:`path based finder`, :data:`sys." +"path`, :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " +"``__path__`` attributes on package objects are also used. These provide " +"additional ways that the import machinery can be customized." msgstr "" -"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based " -"finder`: :data:`sys.path`, :data:`sys.path_hooks` " -"και :data:`sys.path_importer_cache`. Επίσης χρησιμοποιούνται τα " -"χαρακτηριστικά ``__path__`` σε αντικείμενα πακέτου. Αυτά παρέχουν επιπλέον " -"τρόπους παραμετροποίησης του μηχανισμού εισαγωγής." +"Τρεις μεταβλητές χρησιμοποιούνται από τον :term:`path based finder`: :data:" +"`sys.path`, :data:`sys.path_hooks` και :data:`sys.path_importer_cache`. " +"Επίσης χρησιμοποιούνται τα χαρακτηριστικά ``__path__`` σε αντικείμενα " +"πακέτου. Αυτά παρέχουν επιπλέον τρόπους παραμετροποίησης του μηχανισμού " +"εισαγωγής." #: reference/import.rst:708 msgid "" @@ -1487,10 +1478,10 @@ msgid "" "modules and packages. It is initialized from the :envvar:`PYTHONPATH` " "environment variable and various other installation- and implementation-" "specific defaults. Entries in :data:`sys.path` can name directories on the " -"file system, zip files, and potentially other \"locations\" (see " -"the :mod:`site` module) that should be searched for modules, such as URLs, " -"or database queries. Only strings should be present on :data:`sys.path`; " -"all other data types are ignored." +"file system, zip files, and potentially other \"locations\" (see the :mod:" +"`site` module) that should be searched for modules, such as URLs, or " +"database queries. Only strings should be present on :data:`sys.path`; all " +"other data types are ignored." msgstr "" "Το :data:`sys.path` περιέχει μια λίστα από συμβολοσειρές που παρέχουν " "τοποθεσίες αναζήτησης για modules και πακέτα. Αρχικοποιείται από τη " @@ -1507,18 +1498,18 @@ msgid "" "The :term:`path based finder` is a :term:`meta path finder`, so the import " "machinery begins the :term:`import path` search by calling the path based " "finder's :meth:`~importlib.machinery.PathFinder.find_spec` method as " -"described previously. When the ``path`` argument " -"to :meth:`~importlib.machinery.PathFinder.find_spec` is given, it will be a " -"list of string paths to traverse - typically a package's ``__path__`` " -"attribute for an import within that package. If the ``path`` argument is " -"``None``, this indicates a top level import and :data:`sys.path` is used." +"described previously. When the ``path`` argument to :meth:`~importlib." +"machinery.PathFinder.find_spec` is given, it will be a list of string paths " +"to traverse - typically a package's ``__path__`` attribute for an import " +"within that package. If the ``path`` argument is ``None``, this indicates a " +"top level import and :data:`sys.path` is used." msgstr "" "Ο :term:`path based finder` είναι :term:`meta path finder`, επομένως ο " "μηχανισμός εισαγωγής ξεκινά την αναζήτηση στο :term:`import path` καλώντας " "τη μέθοδο :meth:`~importlib.machinery.PathFinder.find_spec` του path based " -"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` " -"στη :meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια " -"λίστα από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " +"finder, όπως περιγράφηκε προηγουμένως. Όταν δοθεί το όρισμα ``path`` στη :" +"meth:`~importlib.machinery.PathFinder.find_spec`, αυτό θα είναι μια λίστα " +"από συμβολοσειρές διαδρομής προς διάσχιση - συνήθως το χαρακτηριστικό " "``__path__`` ενός πακέτου για εισαγωγή μέσα σε εκείνο το πακέτο. Αν το " "όρισμα ``path`` είναι ``None``, αυτό υποδηλώνει εισαγωγή ανωτέρου επιπέδου " "και χρησιμοποιείται το :data:`sys.path`." @@ -1526,17 +1517,17 @@ msgstr "" #: reference/import.rst:726 msgid "" "The path based finder iterates over every entry in the search path, and for " -"each of these, looks for an appropriate :term:`path entry finder` " -"(:class:`~importlib.abc.PathEntryFinder`) for the path entry. Because this " -"can be an expensive operation (e.g. there may be ``stat()`` call overheads " -"for this search), the path based finder maintains a cache mapping path " -"entries to path entry finders. This cache is maintained " -"in :data:`sys.path_importer_cache` (despite the name, this cache actually " -"stores finder objects rather than being limited to :term:`importer` " -"objects). In this way, the expensive search for a particular :term:`path " -"entry` location's :term:`path entry finder` need only be done once. User " -"code is free to remove cache entries from :data:`sys.path_importer_cache` " -"forcing the path based finder to perform the path entry search again." +"each of these, looks for an appropriate :term:`path entry finder` (:class:" +"`~importlib.abc.PathEntryFinder`) for the path entry. Because this can be " +"an expensive operation (e.g. there may be ``stat()`` call overheads for this " +"search), the path based finder maintains a cache mapping path entries to " +"path entry finders. This cache is maintained in :data:`sys." +"path_importer_cache` (despite the name, this cache actually stores finder " +"objects rather than being limited to :term:`importer` objects). In this way, " +"the expensive search for a particular :term:`path entry` location's :term:" +"`path entry finder` need only be done once. User code is free to remove " +"cache entries from :data:`sys.path_importer_cache` forcing the path based " +"finder to perform the path entry search again." msgstr "" "Ο path based finder επαναλαμβάνεται πάνω σε κάθε εγγραφή στη διαδρομή " "αναζήτησης και, για καθεμία, αναζητά έναν κατάλληλο :term:`path entry " @@ -1549,20 +1540,20 @@ msgstr "" "προσωρινή μνήμη αποθηκεύει αντικείμενα finder και όχι μόνο :term:`importer` " "αντικείμενα). Με αυτόν τον τρόπο, η ακριβή αναζήτηση για τον :term:`path " "entry` μιας συγκεκριμένης τοποθεσίας :term:`path entry finder` χρειάζεται να " -"γίνει μόνο μία φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από " -"το :data:`sys.path_importer_cache`, αναγκάζοντας τον path based finder να " +"γίνει μόνο μία φορά. Ο κώδικας του χρήστη μπορεί να αφαιρεί εγγραφές από το :" +"data:`sys.path_importer_cache`, αναγκάζοντας τον path based finder να " "εκτελέσει ξανά την αναζήτηση." #: reference/import.rst:739 msgid "" "If the path entry is not present in the cache, the path based finder " -"iterates over every callable in :data:`sys.path_hooks`. Each of " -"the :term:`path entry hooks ` in this list is called with a " -"single argument, the path entry to be searched. This callable may either " -"return a :term:`path entry finder` that can handle the path entry, or it may " -"raise :exc:`ImportError`. An :exc:`ImportError` is used by the path based " -"finder to signal that the hook cannot find a :term:`path entry finder` for " -"that :term:`path entry`. The exception is ignored and :term:`import path` " +"iterates over every callable in :data:`sys.path_hooks`. Each of the :term:" +"`path entry hooks ` in this list is called with a single " +"argument, the path entry to be searched. This callable may either return a :" +"term:`path entry finder` that can handle the path entry, or it may raise :" +"exc:`ImportError`. An :exc:`ImportError` is used by the path based finder " +"to signal that the hook cannot find a :term:`path entry finder` for that :" +"term:`path entry`. The exception is ignored and :term:`import path` " "iteration continues. The hook should expect either a string or bytes " "object; the encoding of bytes objects is up to the hook (e.g. it may be a " "file system encoding, UTF-8, or something else), and if the hook cannot " @@ -1573,9 +1564,9 @@ msgstr "" "Κάθε :term:`path entry hook ` σε αυτή τη λίστα καλείται με " "ένα μόνο όρισμα: την καταχώρηση διαδρομής που θα αναζητηθεί. Αυτό το " "callable μπορεί είτε να επιστρέψει έναν :term:`path entry finder` που μπορεί " -"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise " -"ένα :exc:`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path " -"based finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " +"να χειριστεί την καταχώρηση διαδρομής, είτε να κάνει raise ένα :exc:" +"`ImportError`. Το :exc:`ImportError` χρησιμοποιείται από τον path based " +"finder για να δηλώσει ότι το hook δεν μπορεί να βρει :term:`path entry " "finder` για το συγκεκριμένο :term:`path entry`. Η εξαίρεση αγνοείται και η " "επανάληψη στο :term:`import path` συνεχίζεται. Το hook θα πρέπει να αναμένει " "είτε συμβολοσειρά είτε αντικείμενο bytes· η κωδικοποίηση των bytes " @@ -1586,19 +1577,18 @@ msgstr "" #: reference/import.rst:753 msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " -"being returned, then the path based " -"finder's :meth:`~importlib.machinery.PathFinder.find_spec` method will store " -"``None`` in :data:`sys.path_importer_cache` (to indicate that there is no " -"finder for this path entry) and return ``None``, indicating that " -"this :term:`meta path finder` could not find the module." -msgstr "" -"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να " -"επιστραφεί :term:`path entry finder`, τότε η " -"μέθοδος :meth:`~importlib.machinery.PathFinder.find_spec` του path based " -"finder θα αποθηκεύσει ``None`` στο :data:`sys.path_importer_cache` (για να " -"δηλώσει ότι δεν υπάρχει finder για αυτή την καταχώρηση διαδρομής) και θα " -"επιστρέψει ``None``, δηλώνοντας ότι αυτός ο :term:`meta path finder` δεν " -"μπόρεσε να βρει το module." +"being returned, then the path based finder's :meth:`~importlib.machinery." +"PathFinder.find_spec` method will store ``None`` in :data:`sys." +"path_importer_cache` (to indicate that there is no finder for this path " +"entry) and return ``None``, indicating that this :term:`meta path finder` " +"could not find the module." +msgstr "" +"Αν η επανάληψη στο :data:`sys.path_hooks` ολοκληρωθεί χωρίς να επιστραφεί :" +"term:`path entry finder`, τότε η μέθοδος :meth:`~importlib.machinery." +"PathFinder.find_spec` του path based finder θα αποθηκεύσει ``None`` στο :" +"data:`sys.path_importer_cache` (για να δηλώσει ότι δεν υπάρχει finder για " +"αυτή την καταχώρηση διαδρομής) και θα επιστρέψει ``None``, δηλώνοντας ότι " +"αυτός ο :term:`meta path finder` δεν μπόρεσε να βρει το module." #: reference/import.rst:760 msgid "" @@ -1619,19 +1609,19 @@ msgid "" "current working directory cannot be determined or is found not to exist, no " "value is stored in :data:`sys.path_importer_cache`. Second, the value for " "the current working directory is looked up fresh for each module lookup. " -"Third, the path used for :data:`sys.path_importer_cache` and returned " -"by :meth:`importlib.machinery.PathFinder.find_spec` will be the actual " -"current working directory and not the empty string." +"Third, the path used for :data:`sys.path_importer_cache` and returned by :" +"meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " +"working directory and not the empty string." msgstr "" "Ο τρέχων κατάλογος εργασίας -- που δηλώνεται με κενή συμβολοσειρά -- " -"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές " -"στο :data:`sys.path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν " -"διαπιστωθεί ότι δεν υπάρχει, δεν αποθηκεύεται τιμή " -"στο :data:`sys.path_importer_cache`. Δεύτερον, η τιμή για τον τρέχοντα " -"κατάλογο εργασίας αναζητείται εκ νέου για κάθε αναζήτηση module. Τρίτον, η " -"διαδρομή που χρησιμοποιείται για το :data:`sys.path_importer_cache` και " -"επιστρέφεται από τη :meth:`importlib.machinery.PathFinder.find_spec` θα " -"είναι ο πραγματικός τρέχων κατάλογος εργασίας και όχι η κενή συμβολοσειρά." +"αντιμετωπίζεται λίγο διαφορετικά από τις άλλες εγγραφές στο :data:`sys." +"path`. Πρώτον, αν δεν μπορεί να προσδιοριστεί ή αν διαπιστωθεί ότι δεν " +"υπάρχει, δεν αποθηκεύεται τιμή στο :data:`sys.path_importer_cache`. " +"Δεύτερον, η τιμή για τον τρέχοντα κατάλογο εργασίας αναζητείται εκ νέου για " +"κάθε αναζήτηση module. Τρίτον, η διαδρομή που χρησιμοποιείται για το :data:" +"`sys.path_importer_cache` και επιστρέφεται από τη :meth:`importlib.machinery." +"PathFinder.find_spec` θα είναι ο πραγματικός τρέχων κατάλογος εργασίας και " +"όχι η κενή συμβολοσειρά." #: reference/import.rst:775 msgid "Path entry finder protocol" @@ -1645,8 +1635,8 @@ msgid "" msgstr "" "Για να υποστηρίζεται η εισαγωγή των modules και των αρχικοποιημένων πακέτων, " "καθώς και για τη συνεισφορά portions σε namespace πακέτα, οι path entry " -"finders πρέπει να υλοποιούν τη " -"μέθοδο :meth:`~importlib.abc.PathEntryFinder.find_spec`." +"finders πρέπει να υλοποιούν τη μέθοδο :meth:`~importlib.abc.PathEntryFinder." +"find_spec`." #: reference/import.rst:781 msgid "" @@ -1663,9 +1653,9 @@ msgstr "" #: reference/import.rst:786 msgid "" -"To indicate to the import machinery that the spec represents a " -"namespace :term:`portion`, the path entry finder sets " -"``submodule_search_locations`` to a list containing the portion." +"To indicate to the import machinery that the spec represents a namespace :" +"term:`portion`, the path entry finder sets ``submodule_search_locations`` to " +"a list containing the portion." msgstr "" "Για να δηλώσει στον μηχανισμό εισαγωγής ότι το spec αναπαριστά ένα " "namespace :term:`portion`, ο path entry finder ορίζει το " @@ -1702,8 +1692,8 @@ msgid "" msgstr "" "Η :meth:`!find_loader` παίρνει ένα όρισμα, το πλήρως αναγνωρισμένο όνομα του " "module που εισάγεται. Η ``find_loader()`` επιστρέφει ένα tuple όπου το πρώτο " -"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα " -"namespace :term:`portion`." +"στοιχείο είναι ο loader και το δεύτερο στοιχείο είναι ένα namespace :term:" +"`portion`." #: reference/import.rst:806 msgid "" @@ -1758,9 +1748,9 @@ msgid "" "entirely with a custom meta path hook." msgstr "" "Ο πιο αξιόπιστος μηχανισμός για την αντικατάσταση ολόκληρου του συστήματος " -"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων " -"του :data:`sys.meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο " -"hook μετά-διαδρομής." +"εισαγωγής είναι η διαγραφή των προεπιλεγμένων περιεχομένων του :data:`sys." +"meta_path`, αντικαθιστώντας τα πλήρως με ένα προσαρμοσμένο hook μετά-" +"διαδρομής." #: reference/import.rst:835 msgid "" @@ -1780,10 +1770,10 @@ msgstr "" msgid "" "To selectively prevent the import of some modules from a hook early on the " "meta path (rather than disabling the standard import system entirely), it is " -"sufficient to raise :exc:`ModuleNotFoundError` directly " -"from :meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning " -"``None``. The latter indicates that the meta path search should continue, " -"while raising an exception terminates it immediately." +"sufficient to raise :exc:`ModuleNotFoundError` directly from :meth:" +"`~importlib.abc.MetaPathFinder.find_spec` instead of returning ``None``. The " +"latter indicates that the meta path search should continue, while raising an " +"exception terminates it immediately." msgstr "" "Για να αποτρέψετε επιλεκτικά την εισαγωγή ορισμένων modules από ένα hook " "νωρίς στη μεταδιαδρομή (αντί να απενεργοποιήσετε πλήρως το τυπικό σύστημα " @@ -1876,8 +1866,8 @@ msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" -"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά " -"το .moduleY δεν είναι έγκυρη έκφραση." +"θα πρέπει να εκθέτει το ``XXX.YYY.ZZZ`` ως χρησιμοποιήσιμη έκφραση, αλλά το ." +"moduleY δεν είναι έγκυρη έκφραση." #: reference/import.rst:892 msgid "Special considerations for __main__" @@ -1887,9 +1877,9 @@ msgstr "Ειδικές περιπτώσεις για το __main__" msgid "" "The :mod:`__main__` module is a special case relative to Python's import " "system. As noted :ref:`elsewhere `, the ``__main__`` module is " -"directly initialized at interpreter startup, much like :mod:`sys` " -"and :mod:`builtins`. However, unlike those two, it doesn't strictly qualify " -"as a built-in module. This is because the manner in which ``__main__`` is " +"directly initialized at interpreter startup, much like :mod:`sys` and :mod:" +"`builtins`. However, unlike those two, it doesn't strictly qualify as a " +"built-in module. This is because the manner in which ``__main__`` is " "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" @@ -1910,8 +1900,8 @@ msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" -"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το " -"``__main__.__spec__`` ορίζεται κατάλληλα ή σε ``None``." +"Ανάλογα με το πώς αρχικοποιείται το :mod:`__main__`, το ``__main__." +"__spec__`` ορίζεται κατάλληλα ή σε ``None``." #: reference/import.rst:910 msgid "" @@ -1927,14 +1917,13 @@ msgstr "" #: reference/import.rst:915 msgid "" -"In :ref:`the remaining cases ` " -"``__main__.__spec__`` is set to ``None``, as the code used to populate " -"the :mod:`__main__` does not correspond directly with an importable module:" +"In :ref:`the remaining cases ` ``__main__." +"__spec__`` is set to ``None``, as the code used to populate the :mod:" +"`__main__` does not correspond directly with an importable module:" msgstr "" -"Στις :ref:`υπόλοιπες περιπτώσεις ` το " -"``__main__.__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που " -"χρησιμοποιείται για να γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε " -"εισαγόμενο module:" +"Στις :ref:`υπόλοιπες περιπτώσεις ` το ``__main__." +"__spec__`` ορίζεται σε ``None``, καθώς ο κώδικας που χρησιμοποιείται για να " +"γεμίσει το :mod:`__main__` δεν αντιστοιχεί άμεσα σε εισαγόμενο module:" #: reference/import.rst:919 msgid "interactive prompt" @@ -1956,8 +1945,8 @@ msgstr "εκτέλεση απευθείας από το αρχείο πηγαί msgid "" "Note that ``__main__.__spec__`` is always ``None`` in the last case, *even " "if* the file could technically be imported directly as a module instead. Use " -"the :option:`-m` switch if valid module metadata is desired " -"in :mod:`__main__`." +"the :option:`-m` switch if valid module metadata is desired in :mod:" +"`__main__`." msgstr "" "Σημειώστε ότι στην τελευταία περίπτωση το ``__main__.__spec__`` είναι πάντα " "``None``, *ακόμη κι αν* το αρχείο θα μπορούσε τεχνικά να εισαχθεί απευθείας " @@ -2060,19 +2049,17 @@ msgstr "Δείτε την :class:`types.ModuleType`." #: reference/import.rst:970 msgid "" "The importlib implementation avoids using the return value directly. " -"Instead, it gets the module object by looking the module name up " -"in :data:`sys.modules`. The indirect effect of this is that an imported " -"module may replace itself in :data:`sys.modules`. This is implementation-" -"specific behavior that is not guaranteed to work in other Python " -"implementations." +"Instead, it gets the module object by looking the module name up in :data:" +"`sys.modules`. The indirect effect of this is that an imported module may " +"replace itself in :data:`sys.modules`. This is implementation-specific " +"behavior that is not guaranteed to work in other Python implementations." msgstr "" "Η υλοποίηση του importlib αποφεύγει να χρησιμοποιεί απευθείας την τιμή " "επιστροφής. Αντ’ αυτού, λαμβάνει το αντικείμενο module αναζητώντας το όνομα " "του module στο :data:`sys.modules`. Έμμεση συνέπεια αυτού είναι ότι ένα " -"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του " -"στο :data:`sys.modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης " -"υλοποίησης και δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της " -"Python." +"εισηγμένο module μπορεί να αντικαταστήσει τον εαυτό του στο :data:`sys." +"modules`. Αυτή είναι μία ειδική συμπεριφορά της συγκεκριμένης υλοποίησης και " +"δεν είναι εγγυημένο ότι λειτουργεί σε άλλες υλοποιήσεις της Python." #: reference/import.rst:8 msgid "import machinery"