|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python 3.15\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2026-07-13 16:24+0000\n" |
| 11 | +"POT-Creation-Date: 2026-07-19 14:48+0000\n" |
12 | 12 | "PO-Revision-Date: 2025-09-16 00:00+0000\n" |
13 | 13 | "Language-Team: Indonesian (https://app.transifex.com/python-doc/teams/5390/" |
14 | 14 | "id/)\n" |
@@ -336,13 +336,132 @@ msgid "" |
336 | 336 | "mod:`!ast` Python module, which exports these constants under the same names." |
337 | 337 | msgstr "" |
338 | 338 |
|
| 339 | +msgid "Low-level flags" |
| 340 | +msgstr "" |
| 341 | + |
| 342 | +msgid "" |
| 343 | +"The following flags and masks serve narrow needs of the standard library and " |
| 344 | +"interactive interpreters. Code outside the standard library rarely has a " |
| 345 | +"reason to use them. They are considered implementation details and may " |
| 346 | +"change at any time." |
| 347 | +msgstr "" |
| 348 | + |
| 349 | +msgid "" |
| 350 | +"This flag is a private interface between the compiler and the :mod:`codeop` " |
| 351 | +"module. Do not use it; its behavior is unsupported and may change without " |
| 352 | +"warning." |
| 353 | +msgstr "" |
| 354 | + |
| 355 | +msgid "" |
| 356 | +"With this flag set, when compilation fails because the source text ends " |
| 357 | +"where more input is expected, for example in the middle of an indented block " |
| 358 | +"or an unterminated string literal, the error raised is the undocumented " |
| 359 | +"``_IncompleteInputError``, a subclass of :exc:`SyntaxError`. The :mod:" |
| 360 | +"`codeop` module sets this flag, together with :c:macro:" |
| 361 | +"`PyCF_DONT_IMPLY_DEDENT`, to tell input that is incomplete apart from input " |
| 362 | +"with a real syntax error, so that interactive interpreters know when to " |
| 363 | +"prompt for another line instead of reporting an error." |
| 364 | +msgstr "" |
| 365 | + |
| 366 | +msgid "" |
| 367 | +"By default, when compiling with the :c:var:`Py_single_input` start symbol, " |
| 368 | +"reaching the end of the source text implicitly closes any open indented " |
| 369 | +"blocks. With this flag set, open blocks are only closed if the last line of " |
| 370 | +"the source ends with a newline; otherwise, compilation fails with a :exc:" |
| 371 | +"`SyntaxError`:" |
| 372 | +msgstr "" |
| 373 | + |
| 374 | +msgid "" |
| 375 | +"PyCompilerFlags flags = {\n" |
| 376 | +" .cf_flags = 0,\n" |
| 377 | +" .cf_feature_version = PY_MINOR_VERSION,\n" |
| 378 | +"};\n" |
| 379 | +"const char *source = \"if a:\\n pass\";\n" |
| 380 | +"\n" |
| 381 | +"/* The \"if\" block is closed implicitly;\n" |
| 382 | +" this returns a code object: */\n" |
| 383 | +"Py_CompileStringFlags(source, \"<input>\", Py_single_input, &flags);\n" |
| 384 | +"\n" |
| 385 | +"/* With the flag, this fails with a SyntaxError,\n" |
| 386 | +" because the last line does not end with a newline: */\n" |
| 387 | +"flags.cf_flags = PyCF_DONT_IMPLY_DEDENT;\n" |
| 388 | +"Py_CompileStringFlags(source, \"<input>\", Py_single_input, &flags);" |
| 389 | +msgstr "" |
| 390 | + |
| 391 | +msgid "" |
| 392 | +"The :mod:`codeop` module uses this flag to detect incomplete interactive " |
| 393 | +"input. While the user is still typing inside an indented block, the source " |
| 394 | +"does not yet end with a newline, so it fails to compile and the user is " |
| 395 | +"prompted for another line." |
| 396 | +msgstr "" |
| 397 | + |
| 398 | +msgid "" |
| 399 | +"Read the source text as UTF-8, ignoring its :pep:`263` encoding declaration " |
| 400 | +"(\"coding cookie\"), if any:" |
| 401 | +msgstr "" |
| 402 | + |
| 403 | +msgid "" |
| 404 | +"PyCompilerFlags flags = {\n" |
| 405 | +" .cf_flags = 0,\n" |
| 406 | +" .cf_feature_version = PY_MINOR_VERSION,\n" |
| 407 | +"};\n" |
| 408 | +"const char *source = \"# coding: latin-1\\ns = '\\xe9'\\n\";\n" |
| 409 | +"\n" |
| 410 | +"/* The coding cookie is honored: byte 0xE9 is decoded as\n" |
| 411 | +" Latin-1, and this returns a code object that sets s to \"é\": */\n" |
| 412 | +"Py_CompileStringFlags(source, \"<input>\", Py_file_input, &flags);\n" |
| 413 | +"\n" |
| 414 | +"/* With the flag, the cookie is ignored and compilation fails\n" |
| 415 | +" with a SyntaxError, because 0xE9 is not valid UTF-8: */\n" |
| 416 | +"flags.cf_flags = PyCF_IGNORE_COOKIE;\n" |
| 417 | +"Py_CompileStringFlags(source, \"<input>\", Py_file_input, &flags);" |
| 418 | +msgstr "" |
| 419 | + |
| 420 | +msgid "" |
| 421 | +"The :func:`compile`, :func:`eval` and :func:`exec` built-in functions set " |
| 422 | +"this flag when the source is a :class:`str` object, because they pass the " |
| 423 | +"text to the parser encoded as UTF-8." |
| 424 | +msgstr "" |
| 425 | + |
| 426 | +msgid "" |
| 427 | +"Mark the source text as known to be UTF-8 encoded. The :func:`compile`, :" |
| 428 | +"func:`eval` and :func:`exec` built-in functions set this flag, but it " |
| 429 | +"currently has no effect." |
| 430 | +msgstr "" |
| 431 | + |
339 | 432 | msgid "" |
340 | 433 | "The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " |
341 | 434 | "such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " |
342 | 435 | "selectable using :ref:`future statements <future>`. See :ref:" |
343 | 436 | "`c_codeobject_flags` for a complete list." |
344 | 437 | msgstr "" |
345 | 438 |
|
| 439 | +msgid "The following masks combine several flags:" |
| 440 | +msgstr "" |
| 441 | + |
| 442 | +msgid "" |
| 443 | +"Bitmask of all ``CO_FUTURE`` flags (see :ref:`c_codeobject_flags`), which " |
| 444 | +"select features normally enabled by :ref:`future statements <future>`. When " |
| 445 | +"code compiled with a ``PyCompilerFlags *flags`` argument contains a ``from " |
| 446 | +"__future__ import`` statement, the flag for the imported feature is added to " |
| 447 | +"*flags*, so that code executed later in the same context inherits it." |
| 448 | +msgstr "" |
| 449 | + |
| 450 | +msgid "" |
| 451 | +"Do not use this mask in new code. It is kept only so that old code passing " |
| 452 | +"its flags to :func:`compile` keeps working." |
| 453 | +msgstr "" |
| 454 | + |
| 455 | +msgid "" |
| 456 | +"Bitmask of flags for obsolete future features that no longer have any effect." |
| 457 | +msgstr "" |
| 458 | + |
| 459 | +msgid "" |
| 460 | +"Bitmask of all ``PyCF`` flags that change how the source is compiled, such " |
| 461 | +"as :c:macro:`PyCF_ONLY_AST`. The :func:`compile` built-in function uses this " |
| 462 | +"mask to validate its *flags* argument." |
| 463 | +msgstr "" |
| 464 | + |
346 | 465 | msgid "Available start symbols" |
347 | 466 | msgstr "" |
348 | 467 |
|
|
0 commit comments