forked from AFPy/python-docs-fr
Hi, gettext_compact=0.
This commit is contained in:
parent 4d36dfa0db
commit 84e5545ebb
476 changed files with 296413 additions and 283327 deletions
743 reference/compound_stmts.po Normal file
743
reference/compound_stmts.po Normal file | | @ -0,0 +1,743 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:5 | ||||
msgid "Compound statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:9 | ||||
msgid "" | ||||
"Compound statements contain (groups of) other statements; they affect or " | ||||
"control the execution of those other statements in some way. In general, " | ||||
"compound statements span multiple lines, although in simple incarnations a " | ||||
"whole compound statement may be contained in one line." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:14 | ||||
msgid "" | ||||
"The :keyword:`if`, :keyword:`while` and :keyword:`for` statements implement " | ||||
"traditional control flow constructs. :keyword:`try` specifies exception " | ||||
"handlers and/or cleanup code for a group of statements, while the :keyword:" | ||||
"`with` statement allows the execution of initialization and finalization " | ||||
"code around a block of code. Function and class definitions are also " | ||||
"syntactically compound statements." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:25 | ||||
msgid "" | ||||
"A compound statement consists of one or more 'clauses.' A clause consists " | ||||
"of a header and a 'suite.' The clause headers of a particular compound " | ||||
"statement are all at the same indentation level. Each clause header begins " | ||||
"with a uniquely identifying keyword and ends with a colon. A suite is a " | ||||
"group of statements controlled by a clause. A suite can be one or more " | ||||
"semicolon-separated simple statements on the same line as the header, " | ||||
"following the header's colon, or it can be one or more indented statements " | ||||
"on subsequent lines. Only the latter form of a suite can contain nested " | ||||
"compound statements; the following is illegal, mostly because it wouldn't be " | ||||
"clear to which :keyword:`if` clause a following :keyword:`else` clause would " | ||||
"belong::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:38 | ||||
msgid "" | ||||
"Also note that the semicolon binds tighter than the colon in this context, " | ||||
"so that in the following example, either all or none of the :func:`print` " | ||||
"calls are executed::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:44 | ||||
msgid "Summarizing:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:66 | ||||
msgid "" | ||||
"Note that statements always end in a ``NEWLINE`` possibly followed by a " | ||||
"``DEDENT``. Also note that optional continuation clauses always begin with " | ||||
"a keyword that cannot start a statement, thus there are no ambiguities (the " | ||||
"'dangling :keyword:`else`' problem is solved in Python by requiring nested :" | ||||
"keyword:`if` statements to be indented)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:72 | ||||
msgid "" | ||||
"The formatting of the grammar rules in the following sections places each " | ||||
"clause on a separate line for clarity." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:81 | ||||
msgid "The :keyword:`if` statement" | ||||
msgstr "L'instruction :keyword:`if`" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:90 | ||||
msgid "The :keyword:`if` statement is used for conditional execution:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:97 | ||||
msgid "" | ||||
"It selects exactly one of the suites by evaluating the expressions one by " | ||||
"one until one is found to be true (see section :ref:`booleans` for the " | ||||
"definition of true and false); then that suite is executed (and no other " | ||||
"part of the :keyword:`if` statement is executed or evaluated). If all " | ||||
"expressions are false, the suite of the :keyword:`else` clause, if present, " | ||||
"is executed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:107 | ||||
msgid "The :keyword:`while` statement" | ||||
msgstr "L'instruction :keyword:`while`" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:115 | ||||
msgid "" | ||||
"The :keyword:`while` statement is used for repeated execution as long as an " | ||||
"expression is true:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:122 | ||||
msgid "" | ||||
"This repeatedly tests the expression and, if it is true, executes the first " | ||||
"suite; if the expression is false (which may be the first time it is tested) " | ||||
"the suite of the :keyword:`else` clause, if present, is executed and the " | ||||
"loop terminates." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:131 | ||||
msgid "" | ||||
"A :keyword:`break` statement executed in the first suite terminates the loop " | ||||
"without executing the :keyword:`else` clause's suite. A :keyword:`continue` " | ||||
"statement executed in the first suite skips the rest of the suite and goes " | ||||
"back to testing the expression." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:140 | ||||
msgid "The :keyword:`for` statement" | ||||
msgstr "L'instruction :keyword:`for`" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:153 | ||||
msgid "" | ||||
"The :keyword:`for` statement is used to iterate over the elements of a " | ||||
"sequence (such as a string, tuple or list) or other iterable object:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:160 | ||||
msgid "" | ||||
"The expression list is evaluated once; it should yield an iterable object. " | ||||
"An iterator is created for the result of the ``expression_list``. The suite " | ||||
"is then executed once for each item provided by the iterator, in the order " | ||||
"returned by the iterator. Each item in turn is assigned to the target list " | ||||
"using the standard rules for assignments (see :ref:`assignment`), and then " | ||||
"the suite is executed. When the items are exhausted (which is immediately " | ||||
"when the sequence is empty or an iterator raises a :exc:`StopIteration` " | ||||
"exception), the suite in the :keyword:`else` clause, if present, is " | ||||
"executed, and the loop terminates." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:173 | ||||
msgid "" | ||||
"A :keyword:`break` statement executed in the first suite terminates the loop " | ||||
"without executing the :keyword:`else` clause's suite. A :keyword:`continue` " | ||||
"statement executed in the first suite skips the rest of the suite and " | ||||
"continues with the next item, or with the :keyword:`else` clause if there is " | ||||
"no next item." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:179 | ||||
msgid "" | ||||
"The for-loop makes assignments to the variables(s) in the target list. This " | ||||
"overwrites all previous assignments to those variables including those made " | ||||
"in the suite of the for-loop::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:193 | ||||
msgid "" | ||||
"Names in the target list are not deleted when the loop is finished, but if " | ||||
"the sequence is empty, they will not have been assigned to at all by the " | ||||
"loop. Hint: the built-in function :func:`range` returns an iterator of " | ||||
"integers suitable to emulate the effect of Pascal's ``for i := a to b do``; " | ||||
"e.g., ``list(range(3))`` returns the list ``[0, 1, 2]``." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:205 | ||||
msgid "" | ||||
"There is a subtlety when the sequence is being modified by the loop (this " | ||||
"can only occur for mutable sequences, i.e. lists). An internal counter is " | ||||
"used to keep track of which item is used next, and this is incremented on " | ||||
"each iteration. When this counter has reached the length of the sequence " | ||||
"the loop terminates. This means that if the suite deletes the current (or a " | ||||
"previous) item from the sequence, the next item will be skipped (since it " | ||||
"gets the index of the current item which has already been treated). " | ||||
"Likewise, if the suite inserts an item in the sequence before the current " | ||||
"item, the current item will be treated again the next time through the loop. " | ||||
"This can lead to nasty bugs that can be avoided by making a temporary copy " | ||||
"using a slice of the whole sequence, e.g., ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:226 | ||||
msgid "The :keyword:`try` statement" | ||||
msgstr "L'instruction :keyword:`try`" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:234 | ||||
msgid "" | ||||
"The :keyword:`try` statement specifies exception handlers and/or cleanup " | ||||
"code for a group of statements:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:247 | ||||
msgid "" | ||||
"The :keyword:`except` clause(s) specify one or more exception handlers. When " | ||||
"no exception occurs in the :keyword:`try` clause, no exception handler is " | ||||
"executed. When an exception occurs in the :keyword:`try` suite, a search for " | ||||
"an exception handler is started. This search inspects the except clauses in " | ||||
"turn until one is found that matches the exception. An expression-less " | ||||
"except clause, if present, must be last; it matches any exception. For an " | ||||
"except clause with an expression, that expression is evaluated, and the " | ||||
"clause matches the exception if the resulting object is \"compatible\" with " | ||||
"the exception. An object is compatible with an exception if it is the class " | ||||
"or a base class of the exception object or a tuple containing an item " | ||||
"compatible with the exception." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:258 | ||||
msgid "" | ||||
"If no except clause matches the exception, the search for an exception " | ||||
"handler continues in the surrounding code and on the invocation stack. [#]_" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:261 | ||||
msgid "" | ||||
"If the evaluation of an expression in the header of an except clause raises " | ||||
"an exception, the original search for a handler is canceled and a search " | ||||
"starts for the new exception in the surrounding code and on the call stack " | ||||
"(it is treated as if the entire :keyword:`try` statement raised the " | ||||
"exception)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:266 | ||||
msgid "" | ||||
"When a matching except clause is found, the exception is assigned to the " | ||||
"target specified after the :keyword:`as` keyword in that except clause, if " | ||||
"present, and the except clause's suite is executed. All except clauses must " | ||||
"have an executable block. When the end of this block is reached, execution " | ||||
"continues normally after the entire try statement. (This means that if two " | ||||
"nested handlers exist for the same exception, and the exception occurs in " | ||||
"the try clause of the inner handler, the outer handler will not handle the " | ||||
"exception.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:274 | ||||
msgid "" | ||||
"When an exception has been assigned using ``as target``, it is cleared at " | ||||
"the end of the except clause. This is as if ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:280 | ||||
msgid "was translated to ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:288 | ||||
msgid "" | ||||
"This means the exception must be assigned to a different name to be able to " | ||||
"refer to it after the except clause. Exceptions are cleared because with " | ||||
"the traceback attached to them, they form a reference cycle with the stack " | ||||
"frame, keeping all locals in that frame alive until the next garbage " | ||||
"collection occurs." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:297 | ||||
msgid "" | ||||
"Before an except clause's suite is executed, details about the exception are " | ||||
"stored in the :mod:`sys` module and can be accessed via :func:`sys." | ||||
"exc_info`. :func:`sys.exc_info` returns a 3-tuple consisting of the " | ||||
"exception class, the exception instance and a traceback object (see section :" | ||||
"ref:`types`) identifying the point in the program where the exception " | ||||
"occurred. :func:`sys.exc_info` values are restored to their previous values " | ||||
"(before the call) when returning from a function that handled an exception." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:311 | ||||
msgid "" | ||||
"The optional :keyword:`else` clause is executed if and when control flows " | ||||
"off the end of the :keyword:`try` clause. [#]_ Exceptions in the :keyword:" | ||||
"`else` clause are not handled by the preceding :keyword:`except` clauses." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:317 | ||||
msgid "" | ||||
"If :keyword:`finally` is present, it specifies a 'cleanup' handler. The :" | ||||
"keyword:`try` clause is executed, including any :keyword:`except` and :" | ||||
"keyword:`else` clauses. If an exception occurs in any of the clauses and is " | ||||
"not handled, the exception is temporarily saved. The :keyword:`finally` " | ||||
"clause is executed. If there is a saved exception it is re-raised at the " | ||||
"end of the :keyword:`finally` clause. If the :keyword:`finally` clause " | ||||
"raises another exception, the saved exception is set as the context of the " | ||||
"new exception. If the :keyword:`finally` clause executes a :keyword:`return` " | ||||
"or :keyword:`break` statement, the saved exception is discarded::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:336 | ||||
msgid "" | ||||
"The exception information is not available to the program during execution " | ||||
"of the :keyword:`finally` clause." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:344 | ||||
msgid "" | ||||
"When a :keyword:`return`, :keyword:`break` or :keyword:`continue` statement " | ||||
"is executed in the :keyword:`try` suite of a :keyword:`try`...\\ :keyword:" | ||||
"`finally` statement, the :keyword:`finally` clause is also executed 'on the " | ||||
"way out.' A :keyword:`continue` statement is illegal in the :keyword:" | ||||
"`finally` clause. (The reason is a problem with the current implementation " | ||||
"--- this restriction may be lifted in the future)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:351 | ||||
msgid "" | ||||
"The return value of a function is determined by the last :keyword:`return` " | ||||
"statement executed. Since the :keyword:`finally` clause always executes, a :" | ||||
"keyword:`return` statement executed in the :keyword:`finally` clause will " | ||||
"always be the last one executed::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:365 | ||||
msgid "" | ||||
"Additional information on exceptions can be found in section :ref:" | ||||
"`exceptions`, and information on using the :keyword:`raise` statement to " | ||||
"generate exceptions may be found in section :ref:`raise`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:374 | ||||
msgid "The :keyword:`with` statement" | ||||
msgstr "L'instruction :keyword:`with`" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:380 | ||||
msgid "" | ||||
"The :keyword:`with` statement is used to wrap the execution of a block with " | ||||
"methods defined by a context manager (see section :ref:`context-managers`). " | ||||
"This allows common :keyword:`try`...\\ :keyword:`except`...\\ :keyword:" | ||||
"`finally` usage patterns to be encapsulated for convenient reuse." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:389 | ||||
msgid "" | ||||
"The execution of the :keyword:`with` statement with one \"item\" proceeds as " | ||||
"follows:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:391 | ||||
msgid "" | ||||
"The context expression (the expression given in the :token:`with_item`) is " | ||||
"evaluated to obtain a context manager." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:394 | ||||
msgid "The context manager's :meth:`__exit__` is loaded for later use." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:396 | ||||
msgid "The context manager's :meth:`__enter__` method is invoked." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:398 | ||||
msgid "" | ||||
"If a target was included in the :keyword:`with` statement, the return value " | ||||
"from :meth:`__enter__` is assigned to it." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:403 | ||||
msgid "" | ||||
"The :keyword:`with` statement guarantees that if the :meth:`__enter__` " | ||||
"method returns without an error, then :meth:`__exit__` will always be " | ||||
"called. Thus, if an error occurs during the assignment to the target list, " | ||||
"it will be treated the same as an error occurring within the suite would be. " | ||||
"See step 6 below." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:409 | ||||
msgid "The suite is executed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:411 | ||||
msgid "" | ||||
"The context manager's :meth:`__exit__` method is invoked. If an exception " | ||||
"caused the suite to be exited, its type, value, and traceback are passed as " | ||||
"arguments to :meth:`__exit__`. Otherwise, three :const:`None` arguments are " | ||||
"supplied." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:416 | ||||
msgid "" | ||||
"If the suite was exited due to an exception, and the return value from the :" | ||||
"meth:`__exit__` method was false, the exception is reraised. If the return " | ||||
"value was true, the exception is suppressed, and execution continues with " | ||||
"the statement following the :keyword:`with` statement." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:421 | ||||
msgid "" | ||||
"If the suite was exited for any reason other than an exception, the return " | ||||
"value from :meth:`__exit__` is ignored, and execution proceeds at the normal " | ||||
"location for the kind of exit that was taken." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:425 | ||||
msgid "" | ||||
"With more than one item, the context managers are processed as if multiple :" | ||||
"keyword:`with` statements were nested::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:431 | ||||
#: ../Doc/reference/compound_stmts.rst:622 | ||||
msgid "is equivalent to ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:437 | ||||
msgid "Support for multiple context expressions." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:443 | ||||
msgid ":pep:`343` - The \"with\" statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:443 | ||||
msgid "" | ||||
"The specification, background, and examples for the Python :keyword:`with` " | ||||
"statement." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:454 | ||||
msgid "Function definitions" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:466 | ||||
msgid "" | ||||
"A function definition defines a user-defined function object (see section :" | ||||
"ref:`types`):" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:483 | ||||
msgid "" | ||||
"A function definition is an executable statement. Its execution binds the " | ||||
"function name in the current local namespace to a function object (a wrapper " | ||||
"around the executable code for the function). This function object contains " | ||||
"a reference to the current global namespace as the global namespace to be " | ||||
"used when the function is called." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:489 | ||||
msgid "" | ||||
"The function definition does not execute the function body; this gets " | ||||
"executed only when the function is called. [#]_" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:495 | ||||
msgid "" | ||||
"A function definition may be wrapped by one or more :term:`decorator` " | ||||
"expressions. Decorator expressions are evaluated when the function is " | ||||
"defined, in the scope that contains the function definition. The result " | ||||
"must be a callable, which is invoked with the function object as the only " | ||||
"argument. The returned value is bound to the function name instead of the " | ||||
"function object. Multiple decorators are applied in nested fashion. For " | ||||
"example, the following code ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:506 | ||||
#: ../Doc/reference/compound_stmts.rst:649 | ||||
msgid "is roughly equivalent to ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:511 | ||||
msgid "" | ||||
"except that the original function is not temporarily bound to the name " | ||||
"``func``." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:517 | ||||
msgid "" | ||||
"When one or more :term:`parameters <parameter>` have the form *parameter* " | ||||
"``=`` *expression*, the function is said to have \"default parameter values." | ||||
"\" For a parameter with a default value, the corresponding :term:`argument` " | ||||
"may be omitted from a call, in which case the parameter's default value is " | ||||
"substituted. If a parameter has a default value, all following parameters " | ||||
"up until the \"``*``\" must also have a default value --- this is a " | ||||
"syntactic restriction that is not expressed by the grammar." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:525 | ||||
msgid "" | ||||
"**Default parameter values are evaluated from left to right when the " | ||||
"function definition is executed.** This means that the expression is " | ||||
"evaluated once, when the function is defined, and that the same \"pre-" | ||||
"computed\" value is used for each call. This is especially important to " | ||||
"understand when a default parameter is a mutable object, such as a list or a " | ||||
"dictionary: if the function modifies the object (e.g. by appending an item " | ||||
"to a list), the default value is in effect modified. This is generally not " | ||||
"what was intended. A way around this is to use ``None`` as the default, and " | ||||
"explicitly test for it in the body of the function, e.g.::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:545 | ||||
msgid "" | ||||
"Function call semantics are described in more detail in section :ref:" | ||||
"`calls`. A function call always assigns values to all parameters mentioned " | ||||
"in the parameter list, either from position arguments, from keyword " | ||||
"arguments, or from default values. If the form \"``*identifier``\" is " | ||||
"present, it is initialized to a tuple receiving any excess positional " | ||||
"parameters, defaulting to the empty tuple. If the form \"``**identifier``\" " | ||||
"is present, it is initialized to a new ordered mapping receiving any excess " | ||||
"keyword arguments, defaulting to a new empty mapping of the same type. " | ||||
"Parameters after \"``*``\" or \"``*identifier``\" are keyword-only " | ||||
"parameters and may only be passed used keyword arguments." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:558 | ||||
msgid "" | ||||
"Parameters may have annotations of the form \"``: expression``\" following " | ||||
"the parameter name. Any parameter may have an annotation even those of the " | ||||
"form ``*identifier`` or ``**identifier``. Functions may have \"return\" " | ||||
"annotation of the form \"``-> expression``\" after the parameter list. " | ||||
"These annotations can be any valid Python expression and are evaluated when " | ||||
"the function definition is executed. Annotations may be evaluated in a " | ||||
"different order than they appear in the source code. The presence of " | ||||
"annotations does not change the semantics of a function. The annotation " | ||||
"values are available as values of a dictionary keyed by the parameters' " | ||||
"names in the :attr:`__annotations__` attribute of the function object." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:571 | ||||
msgid "" | ||||
"It is also possible to create anonymous functions (functions not bound to a " | ||||
"name), for immediate use in expressions. This uses lambda expressions, " | ||||
"described in section :ref:`lambda`. Note that the lambda expression is " | ||||
"merely a shorthand for a simplified function definition; a function defined " | ||||
"in a \":keyword:`def`\" statement can be passed around or assigned to " | ||||
"another name just like a function defined by a lambda expression. The \":" | ||||
"keyword:`def`\" form is actually more powerful since it allows the execution " | ||||
"of multiple statements and annotations." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:579 | ||||
msgid "" | ||||
"**Programmer's note:** Functions are first-class objects. A \"``def``\" " | ||||
"statement executed inside a function definition defines a local function " | ||||
"that can be returned or passed around. Free variables used in the nested " | ||||
"function can access the local variables of the function containing the def. " | ||||
"See section :ref:`naming` for details." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:587 | ||||
msgid ":pep:`3107` - Function Annotations" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:588 | ||||
msgid "The original specification for function annotations." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:594 | ||||
msgid "Class definitions" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:606 | ||||
msgid "A class definition defines a class object (see section :ref:`types`):" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:613 | ||||
msgid "" | ||||
"A class definition is an executable statement. The inheritance list usually " | ||||
"gives a list of base classes (see :ref:`metaclasses` for more advanced " | ||||
"uses), so each item in the list should evaluate to a class object which " | ||||
"allows subclassing. Classes without an inheritance list inherit, by " | ||||
"default, from the base class :class:`object`; hence, ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:627 | ||||
msgid "" | ||||
"The class's suite is then executed in a new execution frame (see :ref:" | ||||
"`naming`), using a newly created local namespace and the original global " | ||||
"namespace. (Usually, the suite contains mostly function definitions.) When " | ||||
"the class's suite finishes execution, its execution frame is discarded but " | ||||
"its local namespace is saved. [#]_ A class object is then created using the " | ||||
"inheritance list for the base classes and the saved local namespace for the " | ||||
"attribute dictionary. The class name is bound to this class object in the " | ||||
"original local namespace." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:636 | ||||
msgid "" | ||||
"The order in which attributes are defined in the class body is preserved in " | ||||
"the new class's ``__dict__``. Note that this is reliable only right after " | ||||
"the class is created and only for classes that were defined using the " | ||||
"definition syntax." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:641 | ||||
msgid "" | ||||
"Class creation can be customized heavily using :ref:`metaclasses " | ||||
"<metaclasses>`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:643 | ||||
msgid "Classes can also be decorated: just like when decorating functions, ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:654 | ||||
msgid "" | ||||
"The evaluation rules for the decorator expressions are the same as for " | ||||
"function decorators. The result is then bound to the class name." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:657 | ||||
msgid "" | ||||
"**Programmer's note:** Variables defined in the class definition are class " | ||||
"attributes; they are shared by instances. Instance attributes can be set in " | ||||
"a method with ``self.name = value``. Both class and instance attributes are " | ||||
"accessible through the notation \"``self.name``\", and an instance attribute " | ||||
"hides a class attribute with the same name when accessed in this way. Class " | ||||
"attributes can be used as defaults for instance attributes, but using " | ||||
"mutable values there can lead to unexpected results. :ref:`Descriptors " | ||||
"<descriptors>` can be used to create instance variables with different " | ||||
"implementation details." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:669 | ||||
msgid ":pep:`3115` - Metaclasses in Python 3 :pep:`3129` - Class Decorators" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:674 | ||||
msgid "Coroutines" | ||||
msgstr "Coroutines" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:682 | ||||
msgid "Coroutine function definition" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:691 | ||||
msgid "" | ||||
"Execution of Python coroutines can be suspended and resumed at many points " | ||||
"(see :term:`coroutine`). In the body of a coroutine, any ``await`` and " | ||||
"``async`` identifiers become reserved keywords; :keyword:`await` " | ||||
"expressions, :keyword:`async for` and :keyword:`async with` can only be used " | ||||
"in coroutine bodies." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:697 | ||||
msgid "" | ||||
"Functions defined with ``async def`` syntax are always coroutine functions, " | ||||
"even if they do not contain ``await`` or ``async`` keywords." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:700 | ||||
msgid "" | ||||
"It is a :exc:`SyntaxError` to use :keyword:`yield` expressions in ``async " | ||||
"def`` coroutines." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:703 | ||||
msgid "An example of a coroutine function::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:714 | ||||
msgid "The :keyword:`async for` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:719 | ||||
msgid "" | ||||
"An :term:`asynchronous iterable` is able to call asynchronous code in its " | ||||
"*iter* implementation, and :term:`asynchronous iterator` can call " | ||||
"asynchronous code in its *next* method." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:723 | ||||
msgid "" | ||||
"The ``async for`` statement allows convenient iteration over asynchronous " | ||||
"iterators." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:726 | ||||
#: ../Doc/reference/compound_stmts.rst:766 | ||||
msgid "The following code::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:733 | ||||
#: ../Doc/reference/compound_stmts.rst:771 | ||||
msgid "Is semantically equivalent to::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:748 | ||||
msgid "See also :meth:`__aiter__` and :meth:`__anext__` for details." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:750 | ||||
msgid "" | ||||
"It is a :exc:`SyntaxError` to use ``async for`` statement outside of an :" | ||||
"keyword:`async def` function." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:758 | ||||
msgid "The :keyword:`async with` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:763 | ||||
msgid "" | ||||
"An :term:`asynchronous context manager` is a :term:`context manager` that is " | ||||
"able to suspend execution in its *enter* and *exit* methods." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:787 | ||||
msgid "See also :meth:`__aenter__` and :meth:`__aexit__` for details." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:789 | ||||
msgid "" | ||||
"It is a :exc:`SyntaxError` to use ``async with`` statement outside of an :" | ||||
"keyword:`async def` function." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:794 | ||||
msgid ":pep:`492` - Coroutines with async and await syntax" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:798 | ||||
msgid "Footnotes" | ||||
msgstr "Notes" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:799 | ||||
msgid "" | ||||
"The exception is propagated to the invocation stack unless there is a :" | ||||
"keyword:`finally` clause which happens to raise another exception. That new " | ||||
"exception causes the old one to be lost." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:803 | ||||
msgid "" | ||||
"Currently, control \"flows off the end\" except in the case of an exception " | ||||
"or the execution of a :keyword:`return`, :keyword:`continue`, or :keyword:" | ||||
"`break` statement." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:807 | ||||
msgid "" | ||||
"A string literal appearing as the first statement in the function body is " | ||||
"transformed into the function's ``__doc__`` attribute and therefore the " | ||||
"function's :term:`docstring`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/compound_stmts.rst:811 | ||||
msgid "" | ||||
"A string literal appearing as the first statement in the class body is " | ||||
"transformed into the namespace's ``__doc__`` item and therefore the class's :" | ||||
"term:`docstring`." | ||||
msgstr "" | ||||
2852 reference/datamodel.po Normal file
2852
reference/datamodel.po Normal file File diff suppressed because it is too large Load diff
316 reference/executionmodel.po Normal file
316
reference/executionmodel.po Normal file | | @ -0,0 +1,316 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:6 | ||||
msgid "Execution model" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:15 | ||||
msgid "Structure of a program" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:19 | ||||
msgid "" | ||||
"A Python program is constructed from code blocks. A :dfn:`block` is a piece " | ||||
"of Python program text that is executed as a unit. The following are blocks: " | ||||
"a module, a function body, and a class definition. Each command typed " | ||||
"interactively is a block. A script file (a file given as standard input to " | ||||
"the interpreter or specified as a command line argument to the interpreter) " | ||||
"is a code block. A script command (a command specified on the interpreter " | ||||
"command line with the '**-c**' option) is a code block. The string argument " | ||||
"passed to the built-in functions :func:`eval` and :func:`exec` is a code " | ||||
"block." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:31 | ||||
msgid "" | ||||
"A code block is executed in an :dfn:`execution frame`. A frame contains " | ||||
"some administrative information (used for debugging) and determines where " | ||||
"and how execution continues after the code block's execution has completed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:38 | ||||
msgid "Naming and binding" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:47 | ||||
msgid "Binding of names" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:53 | ||||
msgid "" | ||||
":dfn:`Names` refer to objects. Names are introduced by name binding " | ||||
"operations." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:57 | ||||
msgid "" | ||||
"The following constructs bind names: formal parameters to functions, :" | ||||
"keyword:`import` statements, class and function definitions (these bind the " | ||||
"class or function name in the defining block), and targets that are " | ||||
"identifiers if occurring in an assignment, :keyword:`for` loop header, or " | ||||
"after :keyword:`as` in a :keyword:`with` statement or :keyword:`except` " | ||||
"clause. The :keyword:`import` statement of the form ``from ... import *`` " | ||||
"binds all names defined in the imported module, except those beginning with " | ||||
"an underscore. This form may only be used at the module level." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:67 | ||||
msgid "" | ||||
"A target occurring in a :keyword:`del` statement is also considered bound " | ||||
"for this purpose (though the actual semantics are to unbind the name)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:70 | ||||
msgid "" | ||||
"Each assignment or import statement occurs within a block defined by a class " | ||||
"or function definition or at the module level (the top-level code block)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:75 | ||||
msgid "" | ||||
"If a name is bound in a block, it is a local variable of that block, unless " | ||||
"declared as :keyword:`nonlocal` or :keyword:`global`. If a name is bound at " | ||||
"the module level, it is a global variable. (The variables of the module " | ||||
"code block are local and global.) If a variable is used in a code block but " | ||||
"not defined there, it is a :dfn:`free variable`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:81 | ||||
msgid "" | ||||
"Each occurrence of a name in the program text refers to the :dfn:`binding` " | ||||
"of that name established by the following name resolution rules." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:87 | ||||
msgid "Resolution of names" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:91 | ||||
msgid "" | ||||
"A :dfn:`scope` defines the visibility of a name within a block. If a local " | ||||
"variable is defined in a block, its scope includes that block. If the " | ||||
"definition occurs in a function block, the scope extends to any blocks " | ||||
"contained within the defining one, unless a contained block introduces a " | ||||
"different binding for the name." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:99 | ||||
msgid "" | ||||
"When a name is used in a code block, it is resolved using the nearest " | ||||
"enclosing scope. The set of all such scopes visible to a code block is " | ||||
"called the block's :dfn:`environment`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:107 | ||||
msgid "" | ||||
"When a name is not found at all, a :exc:`NameError` exception is raised. If " | ||||
"the current scope is a function scope, and the name refers to a local " | ||||
"variable that has not yet been bound to a value at the point where the name " | ||||
"is used, an :exc:`UnboundLocalError` exception is raised. :exc:" | ||||
"`UnboundLocalError` is a subclass of :exc:`NameError`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:113 | ||||
msgid "" | ||||
"If a name binding operation occurs anywhere within a code block, all uses of " | ||||
"the name within the block are treated as references to the current block. " | ||||
"This can lead to errors when a name is used within a block before it is " | ||||
"bound. This rule is subtle. Python lacks declarations and allows name " | ||||
"binding operations to occur anywhere within a code block. The local " | ||||
"variables of a code block can be determined by scanning the entire text of " | ||||
"the block for name binding operations." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:120 | ||||
msgid "" | ||||
"If the :keyword:`global` statement occurs within a block, all uses of the " | ||||
"name specified in the statement refer to the binding of that name in the top-" | ||||
"level namespace. Names are resolved in the top-level namespace by searching " | ||||
"the global namespace, i.e. the namespace of the module containing the code " | ||||
"block, and the builtins namespace, the namespace of the module :mod:" | ||||
"`builtins`. The global namespace is searched first. If the name is not " | ||||
"found there, the builtins namespace is searched. The :keyword:`global` " | ||||
"statement must precede all uses of the name." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:129 | ||||
msgid "" | ||||
"The :keyword:`global` statement has the same scope as a name binding " | ||||
"operation in the same block. If the nearest enclosing scope for a free " | ||||
"variable contains a global statement, the free variable is treated as a " | ||||
"global." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:135 | ||||
msgid "" | ||||
"The :keyword:`nonlocal` statement causes corresponding names to refer to " | ||||
"previously bound variables in the nearest enclosing function scope. :exc:" | ||||
"`SyntaxError` is raised at compile time if the given name does not exist in " | ||||
"any enclosing function scope." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:142 | ||||
msgid "" | ||||
"The namespace for a module is automatically created the first time a module " | ||||
"is imported. The main module for a script is always called :mod:`__main__`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:145 | ||||
msgid "" | ||||
"Class definition blocks and arguments to :func:`exec` and :func:`eval` are " | ||||
"special in the context of name resolution. A class definition is an " | ||||
"executable statement that may use and define names. These references follow " | ||||
"the normal rules for name resolution with an exception that unbound local " | ||||
"variables are looked up in the global namespace. The namespace of the class " | ||||
"definition becomes the attribute dictionary of the class. The scope of names " | ||||
"defined in a class block is limited to the class block; it does not extend " | ||||
"to the code blocks of methods -- this includes comprehensions and generator " | ||||
"expressions since they are implemented using a function scope. This means " | ||||
"that the following will fail::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:163 | ||||
msgid "Builtins and restricted execution" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:167 | ||||
msgid "" | ||||
"The builtins namespace associated with the execution of a code block is " | ||||
"actually found by looking up the name ``__builtins__`` in its global " | ||||
"namespace; this should be a dictionary or a module (in the latter case the " | ||||
"module's dictionary is used). By default, when in the :mod:`__main__` " | ||||
"module, ``__builtins__`` is the built-in module :mod:`builtins`; when in any " | ||||
"other module, ``__builtins__`` is an alias for the dictionary of the :mod:" | ||||
"`builtins` module itself. ``__builtins__`` can be set to a user-created " | ||||
"dictionary to create a weak form of restricted execution." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:178 | ||||
msgid "" | ||||
"Users should not touch ``__builtins__``; it is strictly an implementation " | ||||
"detail. Users wanting to override values in the builtins namespace should :" | ||||
"keyword:`import` the :mod:`builtins` module and modify its attributes " | ||||
"appropriately." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:186 | ||||
msgid "Interaction with dynamic features" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:188 | ||||
msgid "" | ||||
"Name resolution of free variables occurs at runtime, not at compile time. " | ||||
"This means that the following code will print 42::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:197 | ||||
msgid "" | ||||
"There are several cases where Python statements are illegal when used in " | ||||
"conjunction with nested scopes that contain free variables." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:200 | ||||
msgid "" | ||||
"If a variable is referenced in an enclosing scope, it is illegal to delete " | ||||
"the name. An error will be reported at compile time." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:205 | ||||
msgid "" | ||||
"The :func:`eval` and :func:`exec` functions do not have access to the full " | ||||
"environment for resolving names. Names may be resolved in the local and " | ||||
"global namespaces of the caller. Free variables are not resolved in the " | ||||
"nearest enclosing namespace, but in the global namespace. [#]_ The :func:" | ||||
"`exec` and :func:`eval` functions have optional arguments to override the " | ||||
"global and local namespace. If only one namespace is specified, it is used " | ||||
"for both." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:216 | ||||
msgid "Exceptions" | ||||
msgstr "Les exceptions" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:227 | ||||
msgid "" | ||||
"Exceptions are a means of breaking out of the normal flow of control of a " | ||||
"code block in order to handle errors or other exceptional conditions. An " | ||||
"exception is *raised* at the point where the error is detected; it may be " | ||||
"*handled* by the surrounding code block or by any code block that directly " | ||||
"or indirectly invoked the code block where the error occurred." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:233 | ||||
msgid "" | ||||
"The Python interpreter raises an exception when it detects a run-time error " | ||||
"(such as division by zero). A Python program can also explicitly raise an " | ||||
"exception with the :keyword:`raise` statement. Exception handlers are " | ||||
"specified with the :keyword:`try` ... :keyword:`except` statement. The :" | ||||
"keyword:`finally` clause of such a statement can be used to specify cleanup " | ||||
"code which does not handle the exception, but is executed whether an " | ||||
"exception occurred or not in the preceding code." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:243 | ||||
msgid "" | ||||
"Python uses the \"termination\" model of error handling: an exception " | ||||
"handler can find out what happened and continue execution at an outer level, " | ||||
"but it cannot repair the cause of the error and retry the failing operation " | ||||
"(except by re-entering the offending piece of code from the top)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:250 | ||||
msgid "" | ||||
"When an exception is not handled at all, the interpreter terminates " | ||||
"execution of the program, or returns to its interactive main loop. In " | ||||
"either case, it prints a stack backtrace, except when the exception is :exc:" | ||||
"`SystemExit`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:254 | ||||
msgid "" | ||||
"Exceptions are identified by class instances. The :keyword:`except` clause " | ||||
"is selected depending on the class of the instance: it must reference the " | ||||
"class of the instance or a base class thereof. The instance can be received " | ||||
"by the handler and can carry additional information about the exceptional " | ||||
"condition." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:261 | ||||
msgid "" | ||||
"Exception messages are not part of the Python API. Their contents may " | ||||
"change from one version of Python to the next without warning and should not " | ||||
"be relied on by code which will run under multiple versions of the " | ||||
"interpreter." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:265 | ||||
msgid "" | ||||
"See also the description of the :keyword:`try` statement in section :ref:" | ||||
"`try` and :keyword:`raise` statement in section :ref:`raise`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:270 | ||||
msgid "Footnotes" | ||||
msgstr "Notes" | ||||
| ||||
#: ../Doc/reference/executionmodel.rst:271 | ||||
msgid "" | ||||
"This limitation occurs because the code that is executed by these operations " | ||||
"is not available at the time the module is compiled." | ||||
msgstr "" | ||||
1807 reference/expressions.po Normal file
1807
reference/expressions.po Normal file File diff suppressed because it is too large Load diff
27 reference/grammar.po Normal file
27
reference/grammar.po Normal file | | @ -0,0 +1,27 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/grammar.rst:2 | ||||
msgid "Full Grammar specification" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/grammar.rst:4 | ||||
msgid "" | ||||
"This is the full Python grammar, as it is read by the parser generator and " | ||||
"used to parse Python source files:" | ||||
msgstr "" | ||||
1335 reference/import.po Normal file
1335
reference/import.po Normal file File diff suppressed because it is too large Load diff
33 reference/index.po Normal file
33
reference/index.po Normal file | | @ -0,0 +1,33 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/index.rst:5 | ||||
msgid "The Python Language Reference" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/index.rst:7 | ||||
msgid "" | ||||
"This reference manual describes the syntax and \"core semantics\" of the " | ||||
"language. It is terse, but attempts to be exact and complete. The semantics " | ||||
"of non-essential built-in object types and of the built-in functions and " | ||||
"modules are described in :ref:`library-index`. For an informal introduction " | ||||
"to the language, see :ref:`tutorial-index`. For C or C++ programmers, two " | ||||
"additional manuals exist: :ref:`extending-index` describes the high-level " | ||||
"picture of how to write a Python extension module, and the :ref:`c-api-" | ||||
"index` describes the interfaces available to C/C++ programmers in detail." | ||||
msgstr "" | ||||
203 reference/introduction.po Normal file
203
reference/introduction.po Normal file | | @ -0,0 +1,203 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/introduction.rst:6 | ||||
msgid "Introduction" | ||||
msgstr "Introduction" | ||||
| ||||
#: ../Doc/reference/introduction.rst:8 | ||||
msgid "" | ||||
"This reference manual describes the Python programming language. It is not " | ||||
"intended as a tutorial." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:11 | ||||
msgid "" | ||||
"While I am trying to be as precise as possible, I chose to use English " | ||||
"rather than formal specifications for everything except syntax and lexical " | ||||
"analysis. This should make the document more understandable to the average " | ||||
"reader, but will leave room for ambiguities. Consequently, if you were " | ||||
"coming from Mars and tried to re-implement Python from this document alone, " | ||||
"you might have to guess things and in fact you would probably end up " | ||||
"implementing quite a different language. On the other hand, if you are using " | ||||
"Python and wonder what the precise rules about a particular area of the " | ||||
"language are, you should definitely be able to find them here. If you would " | ||||
"like to see a more formal definition of the language, maybe you could " | ||||
"volunteer your time --- or invent a cloning machine :-)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:23 | ||||
msgid "" | ||||
"It is dangerous to add too many implementation details to a language " | ||||
"reference document --- the implementation may change, and other " | ||||
"implementations of the same language may work differently. On the other " | ||||
"hand, CPython is the one Python implementation in widespread use (although " | ||||
"alternate implementations continue to gain support), and its particular " | ||||
"quirks are sometimes worth being mentioned, especially where the " | ||||
"implementation imposes additional limitations. Therefore, you'll find short " | ||||
"\"implementation notes\" sprinkled throughout the text." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:32 | ||||
msgid "" | ||||
"Every Python implementation comes with a number of built-in and standard " | ||||
"modules. These are documented in :ref:`library-index`. A few built-in " | ||||
"modules are mentioned when they interact in a significant way with the " | ||||
"language definition." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:41 | ||||
msgid "Alternate Implementations" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:43 | ||||
msgid "" | ||||
"Though there is one Python implementation which is by far the most popular, " | ||||
"there are some alternate implementations which are of particular interest to " | ||||
"different audiences." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:47 | ||||
msgid "Known implementations include:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:51 | ||||
msgid "CPython" | ||||
msgstr "CPython" | ||||
| ||||
#: ../Doc/reference/introduction.rst:50 | ||||
msgid "" | ||||
"This is the original and most-maintained implementation of Python, written " | ||||
"in C. New language features generally appear here first." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:57 | ||||
msgid "Jython" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:54 | ||||
msgid "" | ||||
"Python implemented in Java. This implementation can be used as a scripting " | ||||
"language for Java applications, or can be used to create applications using " | ||||
"the Java class libraries. It is also often used to create tests for Java " | ||||
"libraries. More information can be found at `the Jython website <http://www." | ||||
"jython.org/>`_." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:63 | ||||
msgid "Python for .NET" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:60 | ||||
msgid "" | ||||
"This implementation actually uses the CPython implementation, but is a " | ||||
"managed .NET application and makes .NET libraries available. It was created " | ||||
"by Brian Lloyd. For more information, see the `Python for .NET home page " | ||||
"<https://pythonnet.github.io/>`_." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:69 | ||||
msgid "IronPython" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:66 | ||||
msgid "" | ||||
"An alternate Python for .NET. Unlike Python.NET, this is a complete Python " | ||||
"implementation that generates IL, and compiles Python code directly to .NET " | ||||
"assemblies. It was created by Jim Hugunin, the original creator of Jython. " | ||||
"For more information, see `the IronPython website <http://ironpython.net/>`_." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:77 | ||||
msgid "PyPy" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:72 | ||||
msgid "" | ||||
"An implementation of Python written completely in Python. It supports " | ||||
"several advanced features not found in other implementations like stackless " | ||||
"support and a Just in Time compiler. One of the goals of the project is to " | ||||
"encourage experimentation with the language itself by making it easier to " | ||||
"modify the interpreter (since it is written in Python). Additional " | ||||
"information is available on `the PyPy project's home page <http://pypy.org/" | ||||
">`_." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:79 | ||||
msgid "" | ||||
"Each of these implementations varies in some way from the language as " | ||||
"documented in this manual, or introduces specific information beyond what's " | ||||
"covered in the standard Python documentation. Please refer to the " | ||||
"implementation-specific documentation to determine what else you need to " | ||||
"know about the specific implementation you're using." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:89 | ||||
msgid "Notation" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:93 | ||||
msgid "" | ||||
"The descriptions of lexical analysis and syntax use a modified BNF grammar " | ||||
"notation. This uses the following style of definition:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:100 | ||||
msgid "" | ||||
"The first line says that a ``name`` is an ``lc_letter`` followed by a " | ||||
"sequence of zero or more ``lc_letter``\\ s and underscores. An " | ||||
"``lc_letter`` in turn is any of the single characters ``'a'`` through " | ||||
"``'z'``. (This rule is actually adhered to for the names defined in lexical " | ||||
"and grammar rules in this document.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:105 | ||||
msgid "" | ||||
"Each rule begins with a name (which is the name defined by the rule) and ``::" | ||||
"=``. A vertical bar (``|``) is used to separate alternatives; it is the " | ||||
"least binding operator in this notation. A star (``*``) means zero or more " | ||||
"repetitions of the preceding item; likewise, a plus (``+``) means one or " | ||||
"more repetitions, and a phrase enclosed in square brackets (``[ ]``) means " | ||||
"zero or one occurrences (in other words, the enclosed phrase is optional). " | ||||
"The ``*`` and ``+`` operators bind as tightly as possible; parentheses are " | ||||
"used for grouping. Literal strings are enclosed in quotes. White space is " | ||||
"only meaningful to separate tokens. Rules are normally contained on a single " | ||||
"line; rules with many alternatives may be formatted alternatively with each " | ||||
"line after the first beginning with a vertical bar." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:119 | ||||
msgid "" | ||||
"In lexical definitions (as the example above), two more conventions are " | ||||
"used: Two literal characters separated by three dots mean a choice of any " | ||||
"single character in the given (inclusive) range of ASCII characters. A " | ||||
"phrase between angular brackets (``<...>``) gives an informal description of " | ||||
"the symbol defined; e.g., this could be used to describe the notion of " | ||||
"'control character' if needed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/introduction.rst:126 | ||||
msgid "" | ||||
"Even though the notation used is almost the same, there is a big difference " | ||||
"between the meaning of lexical and syntactic definitions: a lexical " | ||||
"definition operates on the individual characters of the input source, while " | ||||
"a syntax definition operates on the stream of tokens generated by the " | ||||
"lexical analysis. All uses of BNF in the next chapter (\"Lexical Analysis\") " | ||||
"are lexical definitions; uses in subsequent chapters are syntactic " | ||||
"definitions." | ||||
msgstr "" | ||||
1049 reference/lexical_analysis.po Normal file
1049
reference/lexical_analysis.po Normal file File diff suppressed because it is too large Load diff
983 reference/simple_stmts.po Normal file
983
reference/simple_stmts.po Normal file | | @ -0,0 +1,983 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:6 | ||||
msgid "Simple statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:10 | ||||
msgid "" | ||||
"A simple statement is comprised within a single logical line. Several simple " | ||||
"statements may occur on a single line separated by semicolons. The syntax " | ||||
"for simple statements is:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:35 | ||||
msgid "Expression statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:42 | ||||
msgid "" | ||||
"Expression statements are used (mostly interactively) to compute and write a " | ||||
"value, or (usually) to call a procedure (a function that returns no " | ||||
"meaningful result; in Python, procedures return the value ``None``). Other " | ||||
"uses of expression statements are allowed and occasionally useful. The " | ||||
"syntax for an expression statement is:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:51 | ||||
msgid "" | ||||
"An expression statement evaluates the expression list (which may be a single " | ||||
"expression)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:63 | ||||
msgid "" | ||||
"In interactive mode, if the value is not ``None``, it is converted to a " | ||||
"string using the built-in :func:`repr` function and the resulting string is " | ||||
"written to standard output on a line by itself (except if the result is " | ||||
"``None``, so that procedure calls do not cause any output.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:71 | ||||
msgid "Assignment statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:81 | ||||
msgid "" | ||||
"Assignment statements are used to (re)bind names to values and to modify " | ||||
"attributes or items of mutable objects:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:95 | ||||
msgid "" | ||||
"(See section :ref:`primaries` for the syntax definitions for *attributeref*, " | ||||
"*subscription*, and *slicing*.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:98 | ||||
msgid "" | ||||
"An assignment statement evaluates the expression list (remember that this " | ||||
"can be a single expression or a comma-separated list, the latter yielding a " | ||||
"tuple) and assigns the single resulting object to each of the target lists, " | ||||
"from left to right." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:107 | ||||
msgid "" | ||||
"Assignment is defined recursively depending on the form of the target " | ||||
"(list). When a target is part of a mutable object (an attribute reference, " | ||||
"subscription or slicing), the mutable object must ultimately perform the " | ||||
"assignment and decide about its validity, and may raise an exception if the " | ||||
"assignment is unacceptable. The rules observed by various types and the " | ||||
"exceptions raised are given with the definition of the object types (see " | ||||
"section :ref:`types`)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:116 | ||||
msgid "" | ||||
"Assignment of an object to a target list, optionally enclosed in parentheses " | ||||
"or square brackets, is recursively defined as follows." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:119 | ||||
msgid "If the target list is empty: The object must also be an empty iterable." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:121 | ||||
msgid "" | ||||
"If the target list is a single target in parentheses: The object is assigned " | ||||
"to that target." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:124 | ||||
msgid "" | ||||
"If the target list is a comma-separated list of targets, or a single target " | ||||
"in square brackets: The object must be an iterable with the same number of " | ||||
"items as there are targets in the target list, and the items are assigned, " | ||||
"from left to right, to the corresponding targets." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:129 | ||||
msgid "" | ||||
"If the target list contains one target prefixed with an asterisk, called a " | ||||
"\"starred\" target: The object must be an iterable with at least as many " | ||||
"items as there are targets in the target list, minus one. The first items " | ||||
"of the iterable are assigned, from left to right, to the targets before the " | ||||
"starred target. The final items of the iterable are assigned to the targets " | ||||
"after the starred target. A list of the remaining items in the iterable is " | ||||
"then assigned to the starred target (the list can be empty)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:137 | ||||
msgid "" | ||||
"Else: The object must be an iterable with the same number of items as there " | ||||
"are targets in the target list, and the items are assigned, from left to " | ||||
"right, to the corresponding targets." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:141 | ||||
msgid "" | ||||
"Assignment of an object to a single target is recursively defined as follows." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:143 | ||||
msgid "If the target is an identifier (name):" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:145 | ||||
msgid "" | ||||
"If the name does not occur in a :keyword:`global` or :keyword:`nonlocal` " | ||||
"statement in the current code block: the name is bound to the object in the " | ||||
"current local namespace." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:149 | ||||
msgid "" | ||||
"Otherwise: the name is bound to the object in the global namespace or the " | ||||
"outer namespace determined by :keyword:`nonlocal`, respectively." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:154 | ||||
msgid "" | ||||
"The name is rebound if it was already bound. This may cause the reference " | ||||
"count for the object previously bound to the name to reach zero, causing the " | ||||
"object to be deallocated and its destructor (if it has one) to be called." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:160 | ||||
msgid "" | ||||
"If the target is an attribute reference: The primary expression in the " | ||||
"reference is evaluated. It should yield an object with assignable " | ||||
"attributes; if this is not the case, :exc:`TypeError` is raised. That " | ||||
"object is then asked to assign the assigned object to the given attribute; " | ||||
"if it cannot perform the assignment, it raises an exception (usually but not " | ||||
"necessarily :exc:`AttributeError`)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:169 | ||||
msgid "" | ||||
"Note: If the object is a class instance and the attribute reference occurs " | ||||
"on both sides of the assignment operator, the RHS expression, ``a.x`` can " | ||||
"access either an instance attribute or (if no instance attribute exists) a " | ||||
"class attribute. The LHS target ``a.x`` is always set as an instance " | ||||
"attribute, creating it if necessary. Thus, the two occurrences of ``a.x`` " | ||||
"do not necessarily refer to the same attribute: if the RHS expression refers " | ||||
"to a class attribute, the LHS creates a new instance attribute as the target " | ||||
"of the assignment::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:183 | ||||
msgid "" | ||||
"This description does not necessarily apply to descriptor attributes, such " | ||||
"as properties created with :func:`property`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:190 | ||||
msgid "" | ||||
"If the target is a subscription: The primary expression in the reference is " | ||||
"evaluated. It should yield either a mutable sequence object (such as a " | ||||
"list) or a mapping object (such as a dictionary). Next, the subscript " | ||||
"expression is evaluated." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:199 | ||||
msgid "" | ||||
"If the primary is a mutable sequence object (such as a list), the subscript " | ||||
"must yield an integer. If it is negative, the sequence's length is added to " | ||||
"it. The resulting value must be a nonnegative integer less than the " | ||||
"sequence's length, and the sequence is asked to assign the assigned object " | ||||
"to its item with that index. If the index is out of range, :exc:" | ||||
"`IndexError` is raised (assignment to a subscripted sequence cannot add new " | ||||
"items to a list)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:210 | ||||
msgid "" | ||||
"If the primary is a mapping object (such as a dictionary), the subscript " | ||||
"must have a type compatible with the mapping's key type, and the mapping is " | ||||
"then asked to create a key/datum pair which maps the subscript to the " | ||||
"assigned object. This can either replace an existing key/value pair with " | ||||
"the same key value, or insert a new key/value pair (if no key with the same " | ||||
"value existed)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:216 | ||||
msgid "" | ||||
"For user-defined objects, the :meth:`__setitem__` method is called with " | ||||
"appropriate arguments." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:221 | ||||
msgid "" | ||||
"If the target is a slicing: The primary expression in the reference is " | ||||
"evaluated. It should yield a mutable sequence object (such as a list). The " | ||||
"assigned object should be a sequence object of the same type. Next, the " | ||||
"lower and upper bound expressions are evaluated, insofar they are present; " | ||||
"defaults are zero and the sequence's length. The bounds should evaluate to " | ||||
"integers. If either bound is negative, the sequence's length is added to " | ||||
"it. The resulting bounds are clipped to lie between zero and the sequence's " | ||||
"length, inclusive. Finally, the sequence object is asked to replace the " | ||||
"slice with the items of the assigned sequence. The length of the slice may " | ||||
"be different from the length of the assigned sequence, thus changing the " | ||||
"length of the target sequence, if the target sequence allows it." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:235 | ||||
msgid "" | ||||
"In the current implementation, the syntax for targets is taken to be the " | ||||
"same as for expressions, and invalid syntax is rejected during the code " | ||||
"generation phase, causing less detailed error messages." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:239 | ||||
msgid "" | ||||
"Although the definition of assignment implies that overlaps between the left-" | ||||
"hand side and the right-hand side are 'simultaneous' (for example ``a, b = " | ||||
"b, a`` swaps two variables), overlaps *within* the collection of assigned-to " | ||||
"variables occur left-to-right, sometimes resulting in confusion. For " | ||||
"instance, the following program prints ``[0, 2]``::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:253 | ||||
msgid ":pep:`3132` - Extended Iterable Unpacking" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:254 | ||||
msgid "The specification for the ``*target`` feature." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:260 | ||||
msgid "Augmented assignment statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:278 | ||||
msgid "" | ||||
"Augmented assignment is the combination, in a single statement, of a binary " | ||||
"operation and an assignment statement:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:287 | ||||
msgid "" | ||||
"(See section :ref:`primaries` for the syntax definitions of the last three " | ||||
"symbols.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:290 | ||||
msgid "" | ||||
"An augmented assignment evaluates the target (which, unlike normal " | ||||
"assignment statements, cannot be an unpacking) and the expression list, " | ||||
"performs the binary operation specific to the type of assignment on the two " | ||||
"operands, and assigns the result to the original target. The target is only " | ||||
"evaluated once." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:295 | ||||
msgid "" | ||||
"An augmented assignment expression like ``x += 1`` can be rewritten as ``x = " | ||||
"x + 1`` to achieve a similar, but not exactly equal effect. In the augmented " | ||||
"version, ``x`` is only evaluated once. Also, when possible, the actual " | ||||
"operation is performed *in-place*, meaning that rather than creating a new " | ||||
"object and assigning that to the target, the old object is modified instead." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:301 | ||||
msgid "" | ||||
"Unlike normal assignments, augmented assignments evaluate the left-hand side " | ||||
"*before* evaluating the right-hand side. For example, ``a[i] += f(x)`` " | ||||
"first looks-up ``a[i]``, then it evaluates ``f(x)`` and performs the " | ||||
"addition, and lastly, it writes the result back to ``a[i]``." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:306 | ||||
msgid "" | ||||
"With the exception of assigning to tuples and multiple targets in a single " | ||||
"statement, the assignment done by augmented assignment statements is handled " | ||||
"the same way as normal assignments. Similarly, with the exception of the " | ||||
"possible *in-place* behavior, the binary operation performed by augmented " | ||||
"assignment is the same as the normal binary operations." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:312 | ||||
msgid "" | ||||
"For targets which are attribute references, the same :ref:`caveat about " | ||||
"class and instance attributes <attr-target-note>` applies as for regular " | ||||
"assignments." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:319 | ||||
msgid "Annotated assignment statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:325 | ||||
msgid "" | ||||
"Annotation assignment is the combination, in a single statement, of a " | ||||
"variable or attribute annotation and an optional assignment statement:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:331 | ||||
msgid "" | ||||
"The difference from normal :ref:`assignment` is that only single target and " | ||||
"only single right hand side value is allowed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:334 | ||||
msgid "" | ||||
"For simple names as assignment targets, if in class or module scope, the " | ||||
"annotations are evaluated and stored in a special class or module attribute :" | ||||
"attr:`__annotations__` that is a dictionary mapping from variable names " | ||||
"(mangled if private) to evaluated annotations. This attribute is writable " | ||||
"and is automatically created at the start of class or module body execution, " | ||||
"if annotations are found statically." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:342 | ||||
msgid "" | ||||
"For expressions as assignment targets, the annotations are evaluated if in " | ||||
"class or module scope, but not stored." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:345 | ||||
msgid "" | ||||
"If a name is annotated in a function scope, then this name is local for that " | ||||
"scope. Annotations are never evaluated and stored in function scopes." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:348 | ||||
msgid "" | ||||
"If the right hand side is present, an annotated assignment performs the " | ||||
"actual assignment before evaluating annotations (where applicable). If the " | ||||
"right hand side is not present for an expression target, then the " | ||||
"interpreter evaluates the target except for the last :meth:`__setitem__` or :" | ||||
"meth:`__setattr__` call." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:356 | ||||
msgid "" | ||||
":pep:`526` - Variable and attribute annotation syntax :pep:`484` - Type hints" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:363 | ||||
msgid "The :keyword:`assert` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:369 | ||||
msgid "" | ||||
"Assert statements are a convenient way to insert debugging assertions into a " | ||||
"program:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:375 | ||||
msgid "The simple form, ``assert expression``, is equivalent to ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:380 | ||||
msgid "" | ||||
"The extended form, ``assert expression1, expression2``, is equivalent to ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:389 | ||||
msgid "" | ||||
"These equivalences assume that :const:`__debug__` and :exc:`AssertionError` " | ||||
"refer to the built-in variables with those names. In the current " | ||||
"implementation, the built-in variable :const:`__debug__` is ``True`` under " | ||||
"normal circumstances, ``False`` when optimization is requested (command line " | ||||
"option -O). The current code generator emits no code for an assert " | ||||
"statement when optimization is requested at compile time. Note that it is " | ||||
"unnecessary to include the source code for the expression that failed in the " | ||||
"error message; it will be displayed as part of the stack trace." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:398 | ||||
msgid "" | ||||
"Assignments to :const:`__debug__` are illegal. The value for the built-in " | ||||
"variable is determined when the interpreter starts." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:405 | ||||
msgid "The :keyword:`pass` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:415 | ||||
msgid "" | ||||
":keyword:`pass` is a null operation --- when it is executed, nothing " | ||||
"happens. It is useful as a placeholder when a statement is required " | ||||
"syntactically, but no code needs to be executed, for example::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:427 | ||||
msgid "The :keyword:`del` statement" | ||||
msgstr "L'instruction :keyword:`del`" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:437 | ||||
msgid "" | ||||
"Deletion is recursively defined very similar to the way assignment is " | ||||
"defined. Rather than spelling it out in full details, here are some hints." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:440 | ||||
msgid "" | ||||
"Deletion of a target list recursively deletes each target, from left to " | ||||
"right." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:446 | ||||
msgid "" | ||||
"Deletion of a name removes the binding of that name from the local or global " | ||||
"namespace, depending on whether the name occurs in a :keyword:`global` " | ||||
"statement in the same code block. If the name is unbound, a :exc:" | ||||
"`NameError` exception will be raised." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:453 | ||||
msgid "" | ||||
"Deletion of attribute references, subscriptions and slicings is passed to " | ||||
"the primary object involved; deletion of a slicing is in general equivalent " | ||||
"to assignment of an empty slice of the right type (but even this is " | ||||
"determined by the sliced object)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:458 | ||||
msgid "" | ||||
"Previously it was illegal to delete a name from the local namespace if it " | ||||
"occurs as a free variable in a nested block." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:466 | ||||
msgid "The :keyword:`return` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:476 | ||||
msgid "" | ||||
":keyword:`return` may only occur syntactically nested in a function " | ||||
"definition, not within a nested class definition." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:479 | ||||
msgid "" | ||||
"If an expression list is present, it is evaluated, else ``None`` is " | ||||
"substituted." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:481 | ||||
msgid "" | ||||
":keyword:`return` leaves the current function call with the expression list " | ||||
"(or ``None``) as return value." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:486 | ||||
msgid "" | ||||
"When :keyword:`return` passes control out of a :keyword:`try` statement with " | ||||
"a :keyword:`finally` clause, that :keyword:`finally` clause is executed " | ||||
"before really leaving the function." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:490 | ||||
msgid "" | ||||
"In a generator function, the :keyword:`return` statement indicates that the " | ||||
"generator is done and will cause :exc:`StopIteration` to be raised. The " | ||||
"returned value (if any) is used as an argument to construct :exc:" | ||||
"`StopIteration` and becomes the :attr:`StopIteration.value` attribute." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:499 | ||||
msgid "The :keyword:`yield` statement" | ||||
msgstr "L'instruction :keyword:`yield`" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:511 | ||||
msgid "" | ||||
"A :keyword:`yield` statement is semantically equivalent to a :ref:`yield " | ||||
"expression <yieldexpr>`. The yield statement can be used to omit the " | ||||
"parentheses that would otherwise be required in the equivalent yield " | ||||
"expression statement. For example, the yield statements ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:519 | ||||
msgid "are equivalent to the yield expression statements ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:524 | ||||
msgid "" | ||||
"Yield expressions and statements are only used when defining a :term:" | ||||
"`generator` function, and are only used in the body of the generator " | ||||
"function. Using yield in a function definition is sufficient to cause that " | ||||
"definition to create a generator function instead of a normal function." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:529 | ||||
msgid "" | ||||
"For full details of :keyword:`yield` semantics, refer to the :ref:" | ||||
"`yieldexpr` section." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:535 | ||||
msgid "The :keyword:`raise` statement" | ||||
msgstr "L'instruction :keyword:`raise`" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:546 | ||||
msgid "" | ||||
"If no expressions are present, :keyword:`raise` re-raises the last exception " | ||||
"that was active in the current scope. If no exception is active in the " | ||||
"current scope, a :exc:`RuntimeError` exception is raised indicating that " | ||||
"this is an error." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:551 | ||||
msgid "" | ||||
"Otherwise, :keyword:`raise` evaluates the first expression as the exception " | ||||
"object. It must be either a subclass or an instance of :class:" | ||||
"`BaseException`. If it is a class, the exception instance will be obtained " | ||||
"when needed by instantiating the class with no arguments." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:556 | ||||
msgid "" | ||||
"The :dfn:`type` of the exception is the exception instance's class, the :dfn:" | ||||
"`value` is the instance itself." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:561 | ||||
msgid "" | ||||
"A traceback object is normally created automatically when an exception is " | ||||
"raised and attached to it as the :attr:`__traceback__` attribute, which is " | ||||
"writable. You can create an exception and set your own traceback in one step " | ||||
"using the :meth:`with_traceback` exception method (which returns the same " | ||||
"exception instance, with its traceback set to its argument), like so::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:573 | ||||
msgid "" | ||||
"The ``from`` clause is used for exception chaining: if given, the second " | ||||
"*expression* must be another exception class or instance, which will then be " | ||||
"attached to the raised exception as the :attr:`__cause__` attribute (which " | ||||
"is writable). If the raised exception is not handled, both exceptions will " | ||||
"be printed::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:594 | ||||
msgid "" | ||||
"A similar mechanism works implicitly if an exception is raised inside an " | ||||
"exception handler or a :keyword:`finally` clause: the previous exception is " | ||||
"then attached as the new exception's :attr:`__context__` attribute::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:613 | ||||
msgid "" | ||||
"Additional information on exceptions can be found in section :ref:" | ||||
"`exceptions`, and information about handling exceptions is in section :ref:" | ||||
"`try`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:620 | ||||
msgid "The :keyword:`break` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:631 | ||||
msgid "" | ||||
":keyword:`break` may only occur syntactically nested in a :keyword:`for` or :" | ||||
"keyword:`while` loop, but not nested in a function or class definition " | ||||
"within that loop." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:638 | ||||
msgid "" | ||||
"It terminates the nearest enclosing loop, skipping the optional :keyword:" | ||||
"`else` clause if the loop has one." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:641 | ||||
msgid "" | ||||
"If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control " | ||||
"target keeps its current value." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:646 | ||||
msgid "" | ||||
"When :keyword:`break` passes control out of a :keyword:`try` statement with " | ||||
"a :keyword:`finally` clause, that :keyword:`finally` clause is executed " | ||||
"before really leaving the loop." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:654 | ||||
msgid "The :keyword:`continue` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:666 | ||||
msgid "" | ||||
":keyword:`continue` may only occur syntactically nested in a :keyword:`for` " | ||||
"or :keyword:`while` loop, but not nested in a function or class definition " | ||||
"or :keyword:`finally` clause within that loop. It continues with the next " | ||||
"cycle of the nearest enclosing loop." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:671 | ||||
msgid "" | ||||
"When :keyword:`continue` passes control out of a :keyword:`try` statement " | ||||
"with a :keyword:`finally` clause, that :keyword:`finally` clause is executed " | ||||
"before really starting the next loop cycle." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:680 | ||||
msgid "The :keyword:`import` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:699 | ||||
msgid "" | ||||
"The basic import statement (no :keyword:`from` clause) is executed in two " | ||||
"steps:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:702 | ||||
msgid "find a module, loading and initializing it if necessary" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:703 | ||||
msgid "" | ||||
"define a name or names in the local namespace for the scope where the :" | ||||
"keyword:`import` statement occurs." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:706 | ||||
msgid "" | ||||
"When the statement contains multiple clauses (separated by commas) the two " | ||||
"steps are carried out separately for each clause, just as though the clauses " | ||||
"had been separated out into individual import statements." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:711 | ||||
msgid "" | ||||
"The details of the first step, finding and loading modules are described in " | ||||
"greater detail in the section on the :ref:`import system <importsystem>`, " | ||||
"which also describes the various types of packages and modules that can be " | ||||
"imported, as well as all the hooks that can be used to customize the import " | ||||
"system. Note that failures in this step may indicate either that the module " | ||||
"could not be located, *or* that an error occurred while initializing the " | ||||
"module, which includes execution of the module's code." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:719 | ||||
msgid "" | ||||
"If the requested module is retrieved successfully, it will be made available " | ||||
"in the local namespace in one of three ways:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:724 | ||||
msgid "" | ||||
"If the module name is followed by :keyword:`as`, then the name following :" | ||||
"keyword:`as` is bound directly to the imported module." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:726 | ||||
msgid "" | ||||
"If no other name is specified, and the module being imported is a top level " | ||||
"module, the module's name is bound in the local namespace as a reference to " | ||||
"the imported module" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:729 | ||||
msgid "" | ||||
"If the module being imported is *not* a top level module, then the name of " | ||||
"the top level package that contains the module is bound in the local " | ||||
"namespace as a reference to the top level package. The imported module must " | ||||
"be accessed using its full qualified name rather than directly" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:740 | ||||
msgid "The :keyword:`from` form uses a slightly more complex process:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:742 | ||||
msgid "" | ||||
"find the module specified in the :keyword:`from` clause, loading and " | ||||
"initializing it if necessary;" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:744 | ||||
msgid "for each of the identifiers specified in the :keyword:`import` clauses:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:746 | ||||
msgid "check if the imported module has an attribute by that name" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:747 | ||||
msgid "" | ||||
"if not, attempt to import a submodule with that name and then check the " | ||||
"imported module again for that attribute" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:749 | ||||
msgid "if the attribute is not found, :exc:`ImportError` is raised." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:750 | ||||
msgid "" | ||||
"otherwise, a reference to that value is stored in the local namespace, using " | ||||
"the name in the :keyword:`as` clause if it is present, otherwise using the " | ||||
"attribute name" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:754 | ||||
msgid "Examples::" | ||||
msgstr "Exemples : ::" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:762 | ||||
msgid "" | ||||
"If the list of identifiers is replaced by a star (``'*'``), all public names " | ||||
"defined in the module are bound in the local namespace for the scope where " | ||||
"the :keyword:`import` statement occurs." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:768 | ||||
msgid "" | ||||
"The *public names* defined by a module are determined by checking the " | ||||
"module's namespace for a variable named ``__all__``; if defined, it must be " | ||||
"a sequence of strings which are names defined or imported by that module. " | ||||
"The names given in ``__all__`` are all considered public and are required to " | ||||
"exist. If ``__all__`` is not defined, the set of public names includes all " | ||||
"names found in the module's namespace which do not begin with an underscore " | ||||
"character (``'_'``). ``__all__`` should contain the entire public API. It " | ||||
"is intended to avoid accidentally exporting items that are not part of the " | ||||
"API (such as library modules which were imported and used within the module)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:778 | ||||
msgid "" | ||||
"The wild card form of import --- ``from module import *`` --- is only " | ||||
"allowed at the module level. Attempting to use it in class or function " | ||||
"definitions will raise a :exc:`SyntaxError`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:785 | ||||
msgid "" | ||||
"When specifying what module to import you do not have to specify the " | ||||
"absolute name of the module. When a module or package is contained within " | ||||
"another package it is possible to make a relative import within the same top " | ||||
"package without having to mention the package name. By using leading dots in " | ||||
"the specified module or package after :keyword:`from` you can specify how " | ||||
"high to traverse up the current package hierarchy without specifying exact " | ||||
"names. One leading dot means the current package where the module making the " | ||||
"import exists. Two dots means up one package level. Three dots is up two " | ||||
"levels, etc. So if you execute ``from . import mod`` from a module in the " | ||||
"``pkg`` package then you will end up importing ``pkg.mod``. If you execute " | ||||
"``from ..subpkg2 import mod`` from within ``pkg.subpkg1`` you will import " | ||||
"``pkg.subpkg2.mod``. The specification for relative imports is contained " | ||||
"within :pep:`328`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:798 | ||||
msgid "" | ||||
":func:`importlib.import_module` is provided to support applications that " | ||||
"determine dynamically the modules to be loaded." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:805 | ||||
msgid "Future statements" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:809 | ||||
msgid "" | ||||
"A :dfn:`future statement` is a directive to the compiler that a particular " | ||||
"module should be compiled using syntax or semantics that will be available " | ||||
"in a specified future release of Python where the feature becomes standard." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:813 | ||||
msgid "" | ||||
"The future statement is intended to ease migration to future versions of " | ||||
"Python that introduce incompatible changes to the language. It allows use " | ||||
"of the new features on a per-module basis before the release in which the " | ||||
"feature becomes standard." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:826 | ||||
msgid "" | ||||
"A future statement must appear near the top of the module. The only lines " | ||||
"that can appear before a future statement are:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:829 | ||||
msgid "the module docstring (if any)," | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:830 | ||||
msgid "comments," | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:831 | ||||
msgid "blank lines, and" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:832 | ||||
msgid "other future statements." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:836 | ||||
msgid "" | ||||
"The features recognized by Python 3.0 are ``absolute_import``, ``division``, " | ||||
"``generators``, ``unicode_literals``, ``print_function``, ``nested_scopes`` " | ||||
"and ``with_statement``. They are all redundant because they are always " | ||||
"enabled, and only kept for backwards compatibility." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:841 | ||||
msgid "" | ||||
"A future statement is recognized and treated specially at compile time: " | ||||
"Changes to the semantics of core constructs are often implemented by " | ||||
"generating different code. It may even be the case that a new feature " | ||||
"introduces new incompatible syntax (such as a new reserved word), in which " | ||||
"case the compiler may need to parse the module differently. Such decisions " | ||||
"cannot be pushed off until runtime." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:848 | ||||
msgid "" | ||||
"For any given release, the compiler knows which feature names have been " | ||||
"defined, and raises a compile-time error if a future statement contains a " | ||||
"feature not known to it." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:852 | ||||
msgid "" | ||||
"The direct runtime semantics are the same as for any import statement: there " | ||||
"is a standard module :mod:`__future__`, described later, and it will be " | ||||
"imported in the usual way at the time the future statement is executed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:856 | ||||
msgid "" | ||||
"The interesting runtime semantics depend on the specific feature enabled by " | ||||
"the future statement." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:859 | ||||
msgid "Note that there is nothing special about the statement::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:863 | ||||
msgid "" | ||||
"That is not a future statement; it's an ordinary import statement with no " | ||||
"special semantics or syntax restrictions." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:866 | ||||
msgid "" | ||||
"Code compiled by calls to the built-in functions :func:`exec` and :func:" | ||||
"`compile` that occur in a module :mod:`M` containing a future statement " | ||||
"will, by default, use the new syntax or semantics associated with the future " | ||||
"statement. This can be controlled by optional arguments to :func:`compile` " | ||||
"--- see the documentation of that function for details." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:872 | ||||
msgid "" | ||||
"A future statement typed at an interactive interpreter prompt will take " | ||||
"effect for the rest of the interpreter session. If an interpreter is " | ||||
"started with the :option:`-i` option, is passed a script name to execute, " | ||||
"and the script includes a future statement, it will be in effect in the " | ||||
"interactive session started after the script is executed." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:880 | ||||
msgid ":pep:`236` - Back to the __future__" | ||||
msgstr ":pep:`236` - Back to the __future__" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:881 | ||||
msgid "The original proposal for the __future__ mechanism." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:887 | ||||
msgid "The :keyword:`global` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:896 | ||||
msgid "" | ||||
"The :keyword:`global` statement is a declaration which holds for the entire " | ||||
"current code block. It means that the listed identifiers are to be " | ||||
"interpreted as globals. It would be impossible to assign to a global " | ||||
"variable without :keyword:`global`, although free variables may refer to " | ||||
"globals without being declared global." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:902 | ||||
msgid "" | ||||
"Names listed in a :keyword:`global` statement must not be used in the same " | ||||
"code block textually preceding that :keyword:`global` statement." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:905 | ||||
msgid "" | ||||
"Names listed in a :keyword:`global` statement must not be defined as formal " | ||||
"parameters or in a :keyword:`for` loop control target, :keyword:`class` " | ||||
"definition, function definition, :keyword:`import` statement, or variable " | ||||
"annotation." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:912 | ||||
msgid "" | ||||
"The current implementation does not enforce some of these restriction, but " | ||||
"programs should not abuse this freedom, as future implementations may " | ||||
"enforce them or silently change the meaning of the program." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:921 | ||||
msgid "" | ||||
"**Programmer's note:** the :keyword:`global` is a directive to the parser. " | ||||
"It applies only to code parsed at the same time as the :keyword:`global` " | ||||
"statement. In particular, a :keyword:`global` statement contained in a " | ||||
"string or code object supplied to the built-in :func:`exec` function does " | ||||
"not affect the code block *containing* the function call, and code contained " | ||||
"in such a string is unaffected by :keyword:`global` statements in the code " | ||||
"containing the function call. The same applies to the :func:`eval` and :" | ||||
"func:`compile` functions." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:933 | ||||
msgid "The :keyword:`nonlocal` statement" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:944 | ||||
msgid "" | ||||
"The :keyword:`nonlocal` statement causes the listed identifiers to refer to " | ||||
"previously bound variables in the nearest enclosing scope excluding globals. " | ||||
"This is important because the default behavior for binding is to search the " | ||||
"local namespace first. The statement allows encapsulated code to rebind " | ||||
"variables outside of the local scope besides the global (module) scope." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:954 | ||||
msgid "" | ||||
"Names listed in a :keyword:`nonlocal` statement, unlike those listed in a :" | ||||
"keyword:`global` statement, must refer to pre-existing bindings in an " | ||||
"enclosing scope (the scope in which a new binding should be created cannot " | ||||
"be determined unambiguously)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:959 | ||||
msgid "" | ||||
"Names listed in a :keyword:`nonlocal` statement must not collide with pre-" | ||||
"existing bindings in the local scope." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:964 | ||||
msgid ":pep:`3104` - Access to Names in Outer Scopes" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/simple_stmts.rst:965 | ||||
msgid "The specification for the :keyword:`nonlocal` statement." | ||||
msgstr "" | ||||
118 reference/toplevel_components.po Normal file
118
reference/toplevel_components.po Normal file | | @ -0,0 +1,118 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2016, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:6 | ||||
msgid "Top-level components" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:10 | ||||
msgid "" | ||||
"The Python interpreter can get its input from a number of sources: from a " | ||||
"script passed to it as standard input or as program argument, typed in " | ||||
"interactively, from a module source file, etc. This chapter gives the " | ||||
"syntax used in these cases." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:19 | ||||
msgid "Complete Python programs" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:28 | ||||
msgid "" | ||||
"While a language specification need not prescribe how the language " | ||||
"interpreter is invoked, it is useful to have a notion of a complete Python " | ||||
"program. A complete Python program is executed in a minimally initialized " | ||||
"environment: all built-in and standard modules are available, but none have " | ||||
"been initialized, except for :mod:`sys` (various system services), :mod:" | ||||
"`builtins` (built-in functions, exceptions and ``None``) and :mod:" | ||||
"`__main__`. The latter is used to provide the local and global namespace " | ||||
"for execution of the complete program." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:36 | ||||
msgid "" | ||||
"The syntax for a complete Python program is that for file input, described " | ||||
"in the next section." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:43 | ||||
msgid "" | ||||
"The interpreter may also be invoked in interactive mode; in this case, it " | ||||
"does not read and execute a complete program but reads and executes one " | ||||
"statement (possibly compound) at a time. The initial environment is " | ||||
"identical to that of a complete program; each statement is executed in the " | ||||
"namespace of :mod:`__main__`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:54 | ||||
msgid "" | ||||
"Under Unix, a complete program can be passed to the interpreter in three " | ||||
"forms: with the :option:`-c` *string* command line option, as a file passed " | ||||
"as the first command line argument, or as standard input. If the file or " | ||||
"standard input is a tty device, the interpreter enters interactive mode; " | ||||
"otherwise, it executes the file as a complete program." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:64 | ||||
msgid "File input" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:66 | ||||
msgid "All input read from non-interactive files has the same form:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:71 | ||||
msgid "This syntax is used in the following situations:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:73 | ||||
msgid "when parsing a complete Python program (from a file or from a string);" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:75 | ||||
msgid "when parsing a module;" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:77 | ||||
msgid "when parsing a string passed to the :func:`exec` function;" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:83 | ||||
msgid "Interactive input" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:85 | ||||
msgid "Input in interactive mode is parsed using the following grammar:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:90 | ||||
msgid "" | ||||
"Note that a (top-level) compound statement must be followed by a blank line " | ||||
"in interactive mode; this is needed to help the parser detect the end of the " | ||||
"input." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:97 | ||||
msgid "Expression input" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/reference/toplevel_components.rst:102 | ||||
msgid "" | ||||
":func:`eval` is used for expression input. It ignores leading whitespace. " | ||||
"The string argument to :func:`eval` must have the following form:" | ||||
msgstr "" | ||||
Loading…
Add table
Add a link
Reference in a new issue