diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 55f800175c..9f10861ecc 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-02 00:20+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1063,27 +1063,27 @@ msgid "" "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" -#: ../../howto/logging-cookbook.rst:1903 ../../howto/logging-cookbook.rst:3923 +#: ../../howto/logging-cookbook.rst:1903 ../../howto/logging-cookbook.rst:3944 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../howto/logging-cookbook.rst:1903 ../../howto/logging-cookbook.rst:3923 +#: ../../howto/logging-cookbook.rst:1903 ../../howto/logging-cookbook.rst:3944 msgid "API reference for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1906 ../../howto/logging-cookbook.rst:3926 +#: ../../howto/logging-cookbook.rst:1906 ../../howto/logging-cookbook.rst:3947 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../howto/logging-cookbook.rst:1906 ../../howto/logging-cookbook.rst:3926 +#: ../../howto/logging-cookbook.rst:1906 ../../howto/logging-cookbook.rst:3947 msgid "Configuration API for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1909 ../../howto/logging-cookbook.rst:3929 +#: ../../howto/logging-cookbook.rst:1909 ../../howto/logging-cookbook.rst:3950 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../howto/logging-cookbook.rst:1909 ../../howto/logging-cookbook.rst:3929 +#: ../../howto/logging-cookbook.rst:1909 ../../howto/logging-cookbook.rst:3950 msgid "Useful handlers included with the logging module." msgstr "" @@ -1121,21 +1121,19 @@ msgstr "" #: ../../howto/logging-cookbook.rst:1984 msgid "" "An example of how you can define a namer and rotator is given in the " -"following snippet, which shows zlib-based compression of the log file::" +"following runnable script, which shows gzip compression of the log file::" msgstr "" -#: ../../howto/logging-cookbook.rst:2002 +#: ../../howto/logging-cookbook.rst:2015 msgid "" -"These are not \"true\" .gz files, as they are bare compressed data, with no " -"\"container\" such as you’d find in an actual gzip file. This snippet is " -"just for illustration purposes." +"After running this, you will see six new files, five of which are compressed:" msgstr "" -#: ../../howto/logging-cookbook.rst:2007 +#: ../../howto/logging-cookbook.rst:2028 msgid "A more elaborate multiprocessing example" msgstr "" -#: ../../howto/logging-cookbook.rst:2009 +#: ../../howto/logging-cookbook.rst:2030 msgid "" "The following working example shows how logging can be used with " "multiprocessing using configuration files. The configurations are fairly " @@ -1143,7 +1141,7 @@ msgid "" "in a real multiprocessing scenario." msgstr "" -#: ../../howto/logging-cookbook.rst:2014 +#: ../../howto/logging-cookbook.rst:2035 msgid "" "In the example, the main process spawns a listener process and some worker " "processes. Each of the main process, the listener and the workers have three " @@ -1156,17 +1154,17 @@ msgid "" "own scenario." msgstr "" -#: ../../howto/logging-cookbook.rst:2024 +#: ../../howto/logging-cookbook.rst:2045 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" msgstr "" -#: ../../howto/logging-cookbook.rst:2236 +#: ../../howto/logging-cookbook.rst:2257 msgid "Inserting a BOM into messages sent to a SysLogHandler" msgstr "" -#: ../../howto/logging-cookbook.rst:2238 +#: ../../howto/logging-cookbook.rst:2259 msgid "" ":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " "set of bytes which have the following structure: an optional pure-ASCII " @@ -1175,7 +1173,7 @@ msgid "" "<5424#section-6>`.)" msgstr "" -#: ../../howto/logging-cookbook.rst:2244 +#: ../../howto/logging-cookbook.rst:2265 msgid "" "In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " "insert a BOM into the message, but unfortunately, it was implemented " @@ -1183,7 +1181,7 @@ msgid "" "hence not allowing any pure-ASCII component to appear before it." msgstr "" -#: ../../howto/logging-cookbook.rst:2250 +#: ../../howto/logging-cookbook.rst:2271 msgid "" "As this behaviour is broken, the incorrect BOM insertion code is being " "removed from Python 3.2.4 and later. However, it is not being replaced, and " @@ -1192,33 +1190,33 @@ msgid "" "encoded using UTF-8, then you need to do the following:" msgstr "" -#: ../../howto/logging-cookbook.rst:2256 +#: ../../howto/logging-cookbook.rst:2277 msgid "" "Attach a :class:`~logging.Formatter` instance to your :class:`~logging." "handlers.SysLogHandler` instance, with a format string such as::" msgstr "" -#: ../../howto/logging-cookbook.rst:2262 +#: ../../howto/logging-cookbook.rst:2283 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." msgstr "" -#: ../../howto/logging-cookbook.rst:2265 +#: ../../howto/logging-cookbook.rst:2286 msgid "" "Replace the ASCII section with whatever placeholders you like, but make sure " "that the data that appears in there after substitution is always ASCII (that " "way, it will remain unchanged after UTF-8 encoding)." msgstr "" -#: ../../howto/logging-cookbook.rst:2269 +#: ../../howto/logging-cookbook.rst:2290 msgid "" "Replace the Unicode section with whatever placeholders you like; if the data " "which appears there after substitution contains characters outside the ASCII " "range, that's fine -- it will be encoded using UTF-8." msgstr "" -#: ../../howto/logging-cookbook.rst:2273 +#: ../../howto/logging-cookbook.rst:2294 msgid "" "The formatted message *will* be encoded using UTF-8 encoding by " "``SysLogHandler``. If you follow the above rules, you should be able to " @@ -1227,11 +1225,11 @@ msgid "" "daemon may complain." msgstr "" -#: ../../howto/logging-cookbook.rst:2280 +#: ../../howto/logging-cookbook.rst:2301 msgid "Implementing structured logging" msgstr "" -#: ../../howto/logging-cookbook.rst:2282 +#: ../../howto/logging-cookbook.rst:2303 msgid "" "Although most logging messages are intended for reading by humans, and thus " "not readily machine-parseable, there might be circumstances where you want " @@ -1243,31 +1241,31 @@ msgid "" "machine-parseable manner::" msgstr "" -#: ../../howto/logging-cookbook.rst:2306 +#: ../../howto/logging-cookbook.rst:2327 msgid "If the above script is run, it prints:" msgstr "" -#: ../../howto/logging-cookbook.rst:2312 ../../howto/logging-cookbook.rst:2354 +#: ../../howto/logging-cookbook.rst:2333 ../../howto/logging-cookbook.rst:2375 msgid "" "Note that the order of items might be different according to the version of " "Python used." msgstr "" -#: ../../howto/logging-cookbook.rst:2315 +#: ../../howto/logging-cookbook.rst:2336 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2348 +#: ../../howto/logging-cookbook.rst:2369 msgid "When the above script is run, it prints:" msgstr "" -#: ../../howto/logging-cookbook.rst:2363 +#: ../../howto/logging-cookbook.rst:2384 msgid "Customizing handlers with :func:`dictConfig`" msgstr "" -#: ../../howto/logging-cookbook.rst:2365 +#: ../../howto/logging-cookbook.rst:2386 msgid "" "There are times when you want to customize logging handlers in particular " "ways, and if you use :func:`dictConfig` you may be able to do this without " @@ -1277,24 +1275,24 @@ msgid "" "customize handler creation using a plain function such as::" msgstr "" -#: ../../howto/logging-cookbook.rst:2379 +#: ../../howto/logging-cookbook.rst:2400 msgid "" "You can then specify, in a logging configuration passed to :func:" "`dictConfig`, that a logging handler be created by calling this function::" msgstr "" -#: ../../howto/logging-cookbook.rst:2412 +#: ../../howto/logging-cookbook.rst:2433 msgid "" "In this example I am setting the ownership using the ``pulse`` user and " "group, just for the purposes of illustration. Putting it together into a " "working script, ``chowntest.py``::" msgstr "" -#: ../../howto/logging-cookbook.rst:2459 +#: ../../howto/logging-cookbook.rst:2480 msgid "To run this, you will probably need to run as ``root``:" msgstr "" -#: ../../howto/logging-cookbook.rst:2469 +#: ../../howto/logging-cookbook.rst:2490 msgid "" "Note that this example uses Python 3.3 because that's where :func:`shutil." "chown` makes an appearance. This approach should work with any Python " @@ -1303,17 +1301,17 @@ msgid "" "change using e.g. :func:`os.chown`." msgstr "" -#: ../../howto/logging-cookbook.rst:2475 +#: ../../howto/logging-cookbook.rst:2496 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" msgstr "" -#: ../../howto/logging-cookbook.rst:2480 +#: ../../howto/logging-cookbook.rst:2501 msgid "you could use e.g.::" msgstr "" -#: ../../howto/logging-cookbook.rst:2484 +#: ../../howto/logging-cookbook.rst:2505 msgid "" "where ``project.util`` can be replaced with the actual name of the package " "where the function resides. In the above working script, using ``'ext://" @@ -1321,25 +1319,25 @@ msgid "" "resolved by :func:`dictConfig` from the ``ext://`` specification." msgstr "" -#: ../../howto/logging-cookbook.rst:2489 +#: ../../howto/logging-cookbook.rst:2510 msgid "" "This example hopefully also points the way to how you could implement other " "types of file change - e.g. setting specific POSIX permission bits - in the " "same way, using :func:`os.chmod`." msgstr "" -#: ../../howto/logging-cookbook.rst:2493 +#: ../../howto/logging-cookbook.rst:2514 msgid "" "Of course, the approach could also be extended to types of handler other " "than a :class:`~logging.FileHandler` - for example, one of the rotating file " "handlers, or a different type of handler altogether." msgstr "" -#: ../../howto/logging-cookbook.rst:2503 +#: ../../howto/logging-cookbook.rst:2524 msgid "Using particular formatting styles throughout your application" msgstr "" -#: ../../howto/logging-cookbook.rst:2505 +#: ../../howto/logging-cookbook.rst:2526 msgid "" "In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " "parameter which, while defaulting to ``%`` for backward compatibility, " @@ -1350,7 +1348,7 @@ msgid "" "is constructed." msgstr "" -#: ../../howto/logging-cookbook.rst:2512 +#: ../../howto/logging-cookbook.rst:2533 msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -1365,7 +1363,7 @@ msgid "" "calls which are out there in existing code will be using %-format strings." msgstr "" -#: ../../howto/logging-cookbook.rst:2524 +#: ../../howto/logging-cookbook.rst:2545 msgid "" "There have been suggestions to associate format styles with specific " "loggers, but that approach also runs into backward compatibility problems " @@ -1373,7 +1371,7 @@ msgid "" "formatting." msgstr "" -#: ../../howto/logging-cookbook.rst:2528 +#: ../../howto/logging-cookbook.rst:2549 msgid "" "For logging to work interoperably between any third-party libraries and your " "code, decisions about formatting need to be made at the level of the " @@ -1381,11 +1379,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: ../../howto/logging-cookbook.rst:2535 +#: ../../howto/logging-cookbook.rst:2556 msgid "Using LogRecord factories" msgstr "" -#: ../../howto/logging-cookbook.rst:2537 +#: ../../howto/logging-cookbook.rst:2558 msgid "" "In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " "above, the logging package gained the ability to allow users to set their " @@ -1400,17 +1398,17 @@ msgid "" "implementation does." msgstr "" -#: ../../howto/logging-cookbook.rst:2548 +#: ../../howto/logging-cookbook.rst:2569 msgid "" "Refer to the reference documentation on :func:`setLogRecordFactory` and :" "class:`LogRecord` for more information." msgstr "" -#: ../../howto/logging-cookbook.rst:2553 +#: ../../howto/logging-cookbook.rst:2574 msgid "Using custom message objects" msgstr "" -#: ../../howto/logging-cookbook.rst:2555 +#: ../../howto/logging-cookbook.rst:2576 msgid "" "There is another, perhaps simpler way that you can use {}- and $- formatting " "to construct your individual log messages. You may recall (from :ref:" @@ -1420,7 +1418,7 @@ msgid "" "following two classes::" msgstr "" -#: ../../howto/logging-cookbook.rst:2580 +#: ../../howto/logging-cookbook.rst:2601 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -1431,17 +1429,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: ../../howto/logging-cookbook.rst:2588 +#: ../../howto/logging-cookbook.rst:2609 msgid "" "Examples of this approach are given below. Firstly, formatting with :meth:" "`str.format`::" msgstr "" -#: ../../howto/logging-cookbook.rst:2602 +#: ../../howto/logging-cookbook.rst:2623 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: ../../howto/logging-cookbook.rst:2609 +#: ../../howto/logging-cookbook.rst:2630 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -1453,11 +1451,11 @@ msgid "" "above." msgstr "" -#: ../../howto/logging-cookbook.rst:2623 +#: ../../howto/logging-cookbook.rst:2644 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: ../../howto/logging-cookbook.rst:2625 +#: ../../howto/logging-cookbook.rst:2646 msgid "" "You *can* configure filters using :func:`~logging.config.dictConfig`, though " "it might not be obvious at first glance how to do it (hence this recipe). " @@ -1472,22 +1470,22 @@ msgid "" "complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2678 +#: ../../howto/logging-cookbook.rst:2699 msgid "" "This example shows how you can pass configuration data to the callable which " "constructs the instance, in the form of keyword parameters. When run, the " "above script will print:" msgstr "" -#: ../../howto/logging-cookbook.rst:2686 +#: ../../howto/logging-cookbook.rst:2707 msgid "which shows that the filter is working as configured." msgstr "" -#: ../../howto/logging-cookbook.rst:2688 +#: ../../howto/logging-cookbook.rst:2709 msgid "A couple of extra points to note:" msgstr "" -#: ../../howto/logging-cookbook.rst:2690 +#: ../../howto/logging-cookbook.rst:2711 msgid "" "If you can't refer to the callable directly in the configuration (e.g. if it " "lives in a different module, and you can't import it directly where the " @@ -1497,7 +1495,7 @@ msgid "" "the above example." msgstr "" -#: ../../howto/logging-cookbook.rst:2697 +#: ../../howto/logging-cookbook.rst:2718 msgid "" "As well as for filters, this technique can also be used to configure custom " "handlers and formatters. See :ref:`logging-config-dict-userdef` for more " @@ -1506,11 +1504,11 @@ msgid "" "above." msgstr "" -#: ../../howto/logging-cookbook.rst:2706 +#: ../../howto/logging-cookbook.rst:2727 msgid "Customized exception formatting" msgstr "" -#: ../../howto/logging-cookbook.rst:2708 +#: ../../howto/logging-cookbook.rst:2729 msgid "" "There might be times when you want to do customized exception formatting - " "for argument's sake, let's say you want exactly one line per logged event, " @@ -1518,22 +1516,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2749 +#: ../../howto/logging-cookbook.rst:2770 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: ../../howto/logging-cookbook.rst:2756 +#: ../../howto/logging-cookbook.rst:2777 msgid "" "While the above treatment is simplistic, it points the way to how exception " "information can be formatted to your liking. The :mod:`traceback` module may " "be helpful for more specialized needs." msgstr "" -#: ../../howto/logging-cookbook.rst:2763 +#: ../../howto/logging-cookbook.rst:2784 msgid "Speaking logging messages" msgstr "" -#: ../../howto/logging-cookbook.rst:2765 +#: ../../howto/logging-cookbook.rst:2786 msgid "" "There might be situations when it is desirable to have logging messages " "rendered in an audible rather than a visible format. This is easy to do if " @@ -1550,24 +1548,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: ../../howto/logging-cookbook.rst:2807 +#: ../../howto/logging-cookbook.rst:2828 msgid "" "When run, this script should say \"Hello\" and then \"Goodbye\" in a female " "voice." msgstr "" -#: ../../howto/logging-cookbook.rst:2809 +#: ../../howto/logging-cookbook.rst:2830 msgid "" "The above approach can, of course, be adapted to other TTS systems and even " "other systems altogether which can process messages via external programs " "run from a command line." msgstr "" -#: ../../howto/logging-cookbook.rst:2817 +#: ../../howto/logging-cookbook.rst:2838 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: ../../howto/logging-cookbook.rst:2819 +#: ../../howto/logging-cookbook.rst:2840 msgid "" "There might be situations where you want to log messages in a temporary area " "and only output them if a certain condition occurs. For example, you may " @@ -1577,7 +1575,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: ../../howto/logging-cookbook.rst:2826 +#: ../../howto/logging-cookbook.rst:2847 msgid "" "Here is an example which shows how you could do this using a decorator for " "your functions where you want logging to behave this way. It makes use of " @@ -1590,7 +1588,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: ../../howto/logging-cookbook.rst:2836 +#: ../../howto/logging-cookbook.rst:2857 msgid "" "The example script has a simple function, ``foo``, which just cycles through " "all the logging levels, writing to ``sys.stderr`` to say what level it's " @@ -1599,7 +1597,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: ../../howto/logging-cookbook.rst:2842 +#: ../../howto/logging-cookbook.rst:2863 msgid "" "The script just arranges to decorate ``foo`` with a decorator which will do " "the conditional logging that's required. The decorator takes a logger as a " @@ -1611,30 +1609,30 @@ msgid "" "respectively." msgstr "" -#: ../../howto/logging-cookbook.rst:2850 +#: ../../howto/logging-cookbook.rst:2871 msgid "Here's the script::" msgstr "" -#: ../../howto/logging-cookbook.rst:2913 +#: ../../howto/logging-cookbook.rst:2934 msgid "When this script is run, the following output should be observed:" msgstr "" -#: ../../howto/logging-cookbook.rst:2943 +#: ../../howto/logging-cookbook.rst:2964 msgid "" "As you can see, actual logging output only occurs when an event is logged " "whose severity is ERROR or greater, but in that case, any previous events at " "lower severities are also logged." msgstr "" -#: ../../howto/logging-cookbook.rst:2947 +#: ../../howto/logging-cookbook.rst:2968 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: ../../howto/logging-cookbook.rst:2957 +#: ../../howto/logging-cookbook.rst:2978 msgid "Sending logging messages to email, with buffering" msgstr "" -#: ../../howto/logging-cookbook.rst:2959 +#: ../../howto/logging-cookbook.rst:2980 msgid "" "To illustrate how you can send log messages via email, so that a set number " "of messages are sent per email, you can subclass :class:`~logging.handlers." @@ -1645,7 +1643,7 @@ msgid "" "argument to see the required and optional arguments.)" msgstr "" -#: ../../howto/logging-cookbook.rst:3031 +#: ../../howto/logging-cookbook.rst:3052 msgid "" "If you run this script and your SMTP server is correctly set up, you should " "find that it sends eleven emails to the addressee you specify. The first ten " @@ -1653,17 +1651,17 @@ msgid "" "messages. That makes up 102 messages as specified in the script." msgstr "" -#: ../../howto/logging-cookbook.rst:3039 +#: ../../howto/logging-cookbook.rst:3060 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:3041 +#: ../../howto/logging-cookbook.rst:3062 msgid "" "Sometimes you want to format times using UTC, which can be done using a " "class such as ``UTCFormatter``, shown below::" msgstr "" -#: ../../howto/logging-cookbook.rst:3050 +#: ../../howto/logging-cookbook.rst:3071 msgid "" "and you can then use the ``UTCFormatter`` in your code instead of :class:" "`~logging.Formatter`. If you want to do that via configuration, you can use " @@ -1671,21 +1669,21 @@ msgid "" "the following complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:3093 +#: ../../howto/logging-cookbook.rst:3114 msgid "When this script is run, it should print something like:" msgstr "" -#: ../../howto/logging-cookbook.rst:3100 +#: ../../howto/logging-cookbook.rst:3121 msgid "" "showing how the time is formatted both as local time and UTC, one for each " "handler." msgstr "" -#: ../../howto/logging-cookbook.rst:3107 +#: ../../howto/logging-cookbook.rst:3128 msgid "Using a context manager for selective logging" msgstr "" -#: ../../howto/logging-cookbook.rst:3109 +#: ../../howto/logging-cookbook.rst:3130 msgid "" "There are times when it would be useful to temporarily change the logging " "configuration and revert it back after doing something. For this, a context " @@ -1695,7 +1693,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: ../../howto/logging-cookbook.rst:3142 +#: ../../howto/logging-cookbook.rst:3163 msgid "" "If you specify a level value, the logger's level is set to that value in the " "scope of the with block covered by the context manager. If you specify a " @@ -1704,13 +1702,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: ../../howto/logging-cookbook.rst:3148 +#: ../../howto/logging-cookbook.rst:3169 msgid "" "To illustrate how it works, we can add the following block of code to the " "above::" msgstr "" -#: ../../howto/logging-cookbook.rst:3166 +#: ../../howto/logging-cookbook.rst:3187 msgid "" "We initially set the logger's level to ``INFO``, so message #1 appears and " "message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " @@ -1723,56 +1721,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: ../../howto/logging-cookbook.rst:3176 +#: ../../howto/logging-cookbook.rst:3197 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: ../../howto/logging-cookbook.rst:3187 +#: ../../howto/logging-cookbook.rst:3208 msgid "" "If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " "following, which is the only message written to ``stdout``:" msgstr "" -#: ../../howto/logging-cookbook.rst:3195 +#: ../../howto/logging-cookbook.rst:3216 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: ../../howto/logging-cookbook.rst:3205 +#: ../../howto/logging-cookbook.rst:3226 msgid "" "In this case, the message #5 printed to ``stdout`` doesn't appear, as " "expected." msgstr "" -#: ../../howto/logging-cookbook.rst:3207 +#: ../../howto/logging-cookbook.rst:3228 msgid "" "Of course, the approach described here can be generalised, for example to " "attach logging filters temporarily. Note that the above code works in Python " "2 as well as Python 3." msgstr "" -#: ../../howto/logging-cookbook.rst:3215 +#: ../../howto/logging-cookbook.rst:3236 msgid "A CLI application starter template" msgstr "" -#: ../../howto/logging-cookbook.rst:3217 +#: ../../howto/logging-cookbook.rst:3238 msgid "Here's an example which shows how you can:" msgstr "" -#: ../../howto/logging-cookbook.rst:3219 +#: ../../howto/logging-cookbook.rst:3240 msgid "Use a logging level based on command-line arguments" msgstr "" -#: ../../howto/logging-cookbook.rst:3220 +#: ../../howto/logging-cookbook.rst:3241 msgid "" "Dispatch to multiple subcommands in separate files, all logging at the same " "level in a consistent way" msgstr "" -#: ../../howto/logging-cookbook.rst:3222 +#: ../../howto/logging-cookbook.rst:3243 msgid "Make use of simple, minimal configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:3224 +#: ../../howto/logging-cookbook.rst:3245 msgid "" "Suppose we have a command-line application whose job is to stop, start or " "restart some services. This could be organised for the purposes of " @@ -1783,53 +1781,53 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: ../../howto/logging-cookbook.rst:3273 +#: ../../howto/logging-cookbook.rst:3294 msgid "" "And the ``start``, ``stop`` and ``restart`` commands can be implemented in " "separate modules, like so for starting::" msgstr "" -#: ../../howto/logging-cookbook.rst:3286 +#: ../../howto/logging-cookbook.rst:3307 msgid "and thus for stopping::" msgstr "" -#: ../../howto/logging-cookbook.rst:3307 +#: ../../howto/logging-cookbook.rst:3328 msgid "and similarly for restarting::" msgstr "" -#: ../../howto/logging-cookbook.rst:3328 +#: ../../howto/logging-cookbook.rst:3349 msgid "" "If we run this application with the default log level, we get output like " "this:" msgstr "" -#: ../../howto/logging-cookbook.rst:3341 +#: ../../howto/logging-cookbook.rst:3362 msgid "" "The first word is the logging level, and the second word is the module or " "package name of the place where the event was logged." msgstr "" -#: ../../howto/logging-cookbook.rst:3344 +#: ../../howto/logging-cookbook.rst:3365 msgid "" "If we change the logging level, then we can change the information sent to " "the log. For example, if we want more information:" msgstr "" -#: ../../howto/logging-cookbook.rst:3361 +#: ../../howto/logging-cookbook.rst:3382 msgid "And if we want less:" msgstr "" -#: ../../howto/logging-cookbook.rst:3369 +#: ../../howto/logging-cookbook.rst:3390 msgid "" "In this case, the commands don't print anything to the console, since " "nothing at ``WARNING`` level or above is logged by them." msgstr "" -#: ../../howto/logging-cookbook.rst:3375 +#: ../../howto/logging-cookbook.rst:3396 msgid "A Qt GUI for logging" msgstr "" -#: ../../howto/logging-cookbook.rst:3377 +#: ../../howto/logging-cookbook.rst:3398 msgid "" "A question that comes up from time to time is about how to log to a GUI " "application. The `Qt <https://www.qt.io/>`_ framework is a popular cross-" @@ -1837,7 +1835,7 @@ msgid "" "project/PySide2/>`_ or `PyQt5 <https://pypi.org/project/PyQt5/>`_ libraries." msgstr "" -#: ../../howto/logging-cookbook.rst:3383 +#: ../../howto/logging-cookbook.rst:3404 msgid "" "The following example shows how to log to a Qt GUI. This introduces a simple " "``QtHandler`` class which takes a callable, which should be a slot in the " @@ -1847,14 +1845,14 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: ../../howto/logging-cookbook.rst:3390 +#: ../../howto/logging-cookbook.rst:3411 msgid "" "The worker thread is implemented using Qt's ``QThread`` class rather than " "the :mod:`threading` module, as there are circumstances where one has to use " "``QThread``, which offers better integration with other ``Qt`` components." msgstr "" -#: ../../howto/logging-cookbook.rst:3394 +#: ../../howto/logging-cookbook.rst:3415 msgid "" "The code should work with recent releases of either ``PySide2`` or " "``PyQt5``. You should be able to adapt the approach to earlier versions of " @@ -1862,11 +1860,11 @@ msgid "" "information." msgstr "" -#: ../../howto/logging-cookbook.rst:3608 +#: ../../howto/logging-cookbook.rst:3629 msgid "Logging to syslog with RFC5424 support" msgstr "" -#: ../../howto/logging-cookbook.rst:3610 +#: ../../howto/logging-cookbook.rst:3631 msgid "" "Although :rfc:`5424` dates from 2009, most syslog servers are configured by " "detault to use the older :rfc:`3164`, which hails from 2001. When " @@ -1876,14 +1874,14 @@ msgid "" "handlers.SysLogHandler` functionality has not been updated." msgstr "" -#: ../../howto/logging-cookbook.rst:3617 +#: ../../howto/logging-cookbook.rst:3638 msgid "" "RFC 5424 contains some useful features such as support for structured data, " "and if you need to be able to log to a syslog server with support for it, " "you can do so with a subclassed handler which looks something like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:3683 +#: ../../howto/logging-cookbook.rst:3704 msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " @@ -1892,11 +1890,11 @@ msgid "" "using something like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:3697 +#: ../../howto/logging-cookbook.rst:3718 msgid "How to treat a logger like an output stream" msgstr "" -#: ../../howto/logging-cookbook.rst:3699 +#: ../../howto/logging-cookbook.rst:3720 msgid "" "Sometimes, you need to interface to a third-party API which expects a file-" "like object to write to, but you want to direct the API's output to a " @@ -1904,17 +1902,17 @@ msgid "" "API. Here's a short script illustrating such a class:" msgstr "" -#: ../../howto/logging-cookbook.rst:3739 +#: ../../howto/logging-cookbook.rst:3760 msgid "When this script is run, it prints" msgstr "" -#: ../../howto/logging-cookbook.rst:3746 +#: ../../howto/logging-cookbook.rst:3767 msgid "" "You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys." "stderr`` by doing something like this:" msgstr "" -#: ../../howto/logging-cookbook.rst:3756 +#: ../../howto/logging-cookbook.rst:3777 msgid "" "You should do this *after* configuring logging for your needs. In the above " "example, the :func:`~logging.basicConfig` call does this (using the ``sys." @@ -1922,25 +1920,25 @@ msgid "" "Then, you'd get this kind of result:" msgstr "" -#: ../../howto/logging-cookbook.rst:3769 +#: ../../howto/logging-cookbook.rst:3790 msgid "" "Of course, the examples above show output according to the format used by :" "func:`~logging.basicConfig`, but you can use a different formatter when you " "configure logging." msgstr "" -#: ../../howto/logging-cookbook.rst:3773 +#: ../../howto/logging-cookbook.rst:3794 msgid "" "Note that with the above scheme, you are somewhat at the mercy of buffering " "and the sequence of write calls which you are intercepting. For example, " "with the definition of ``LoggerWriter`` above, if you have the snippet" msgstr "" -#: ../../howto/logging-cookbook.rst:3782 +#: ../../howto/logging-cookbook.rst:3803 msgid "then running the script results in" msgstr "" -#: ../../howto/logging-cookbook.rst:3800 +#: ../../howto/logging-cookbook.rst:3821 msgid "" "As you can see, this output isn't ideal. That's because the underlying code " "which writes to ``sys.stderr`` makes mutiple writes, each of which results " @@ -1950,17 +1948,17 @@ msgid "" "``LoggerWriter``:" msgstr "" -#: ../../howto/logging-cookbook.rst:3825 +#: ../../howto/logging-cookbook.rst:3846 msgid "" "This just buffers up stuff until a newline is seen, and then logs complete " "lines. With this approach, you get better output:" msgstr "" -#: ../../howto/logging-cookbook.rst:3841 +#: ../../howto/logging-cookbook.rst:3862 msgid "Patterns to avoid" msgstr "" -#: ../../howto/logging-cookbook.rst:3843 +#: ../../howto/logging-cookbook.rst:3864 msgid "" "Although the preceding sections have described ways of doing things you " "might need to do or deal with, it is worth mentioning some usage patterns " @@ -1968,11 +1966,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: ../../howto/logging-cookbook.rst:3849 +#: ../../howto/logging-cookbook.rst:3870 msgid "Opening the same log file multiple times" msgstr "" -#: ../../howto/logging-cookbook.rst:3851 +#: ../../howto/logging-cookbook.rst:3872 msgid "" "On Windows, you will generally not be able to open the same file multiple " "times as this will lead to a \"file is in use by another process\" error. " @@ -1980,32 +1978,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: ../../howto/logging-cookbook.rst:3856 +#: ../../howto/logging-cookbook.rst:3877 msgid "" "Adding a file handler more than once which references the same file (e.g. by " "a copy/paste/forget-to-change error)." msgstr "" -#: ../../howto/logging-cookbook.rst:3859 +#: ../../howto/logging-cookbook.rst:3880 msgid "" "Opening two files that look different, as they have different names, but are " "the same because one is a symbolic link to the other." msgstr "" -#: ../../howto/logging-cookbook.rst:3862 +#: ../../howto/logging-cookbook.rst:3883 msgid "" "Forking a process, following which both parent and child have a reference to " "the same file. This might be through use of the :mod:`multiprocessing` " "module, for example." msgstr "" -#: ../../howto/logging-cookbook.rst:3866 +#: ../../howto/logging-cookbook.rst:3887 msgid "" "Opening a file multiple times might *appear* to work most of the time, but " "can lead to a number of problems in practice:" msgstr "" -#: ../../howto/logging-cookbook.rst:3869 +#: ../../howto/logging-cookbook.rst:3890 msgid "" "Logging output can be garbled because multiple threads or processes try to " "write to the same file. Although logging guards against concurrent use of " @@ -2014,7 +2012,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: ../../howto/logging-cookbook.rst:3875 +#: ../../howto/logging-cookbook.rst:3896 msgid "" "An attempt to delete a file (e.g. during file rotation) silently fails, " "because there is another reference pointing to it. This can lead to " @@ -2024,17 +2022,17 @@ msgid "" "being supposedly in place." msgstr "" -#: ../../howto/logging-cookbook.rst:3882 +#: ../../howto/logging-cookbook.rst:3903 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: ../../howto/logging-cookbook.rst:3886 +#: ../../howto/logging-cookbook.rst:3907 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: ../../howto/logging-cookbook.rst:3888 +#: ../../howto/logging-cookbook.rst:3909 msgid "" "While there might be unusual cases where you'll need to do this, in general " "there is no point because loggers are singletons. Code can always access a " @@ -2045,12 +2043,12 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: ../../howto/logging-cookbook.rst:3897 +#: ../../howto/logging-cookbook.rst:3918 msgid "" "Adding handlers other than :class:`NullHandler` to a logger in a library" msgstr "" -#: ../../howto/logging-cookbook.rst:3899 +#: ../../howto/logging-cookbook.rst:3920 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -2058,11 +2056,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: ../../howto/logging-cookbook.rst:3905 +#: ../../howto/logging-cookbook.rst:3926 msgid "Creating a lot of loggers" msgstr "" -#: ../../howto/logging-cookbook.rst:3907 +#: ../../howto/logging-cookbook.rst:3928 msgid "" "Loggers are singletons that are never freed during a script execution, and " "so creating lots of loggers will use up memory which can't then be freed. " @@ -2073,14 +2071,14 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: ../../howto/logging-cookbook.rst:3918 +#: ../../howto/logging-cookbook.rst:3939 msgid "Other resources" msgstr "" -#: ../../howto/logging-cookbook.rst:3931 +#: ../../howto/logging-cookbook.rst:3952 msgid ":ref:`Basic Tutorial <logging-basic-tutorial>`" msgstr "" -#: ../../howto/logging-cookbook.rst:3933 +#: ../../howto/logging-cookbook.rst:3954 msgid ":ref:`Advanced Tutorial <logging-advanced-tutorial>`" msgstr "" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index fc94297ca9..c45f22e4aa 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-11 00:15+0000\n" +"POT-Creation-Date: 2023-01-14 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -147,9 +147,10 @@ msgstr "" #: ../../library/asyncio-policy.rst:116 msgid "" -"In Python versions 3.10.9, 3.11.1 and 3.12 this function emits a :exc:" -"`DeprecationWarning` if there is no running event loop and no current loop " -"is set. In some future Python release this will become an error." +"In Python versions 3.10.9, 3.11.1 and 3.12 the :meth:`get_event_loop` method " +"of the default asyncio policy emits a :exc:`DeprecationWarning` if there is " +"no running event loop and no current loop is set. In some future Python " +"release this will become an error." msgstr "" #: ../../library/asyncio-policy.rst:124 diff --git a/library/datetime.po b/library/datetime.po index 66bcbd488f..69e69d90a8 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-11 00:18+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1636,8 +1636,8 @@ msgstr "" msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " -"UTC; as a result, using ``utcfromtimetuple`` may give misleading results. If " -"you have a naive ``datetime`` representing UTC, use ``datetime." +"UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading " +"results. If you have a naive ``datetime`` representing UTC, use ``datetime." "replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :" "meth:`.datetime.timetuple`." msgstr "" diff --git a/library/email.mime.po b/library/email.mime.po index d10dbddb73..527ac023ab 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-01-15 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:00+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -165,9 +165,9 @@ msgstr "模組:\\ :mod:`email.mime.application`" msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEApplication` class is used to represent MIME message objects of major " -"type :mimetype:`application`. *_data* is a string containing the raw byte " -"data. Optional *_subtype* specifies the MIME subtype and defaults to :" -"mimetype:`octet-stream`." +"type :mimetype:`application`. *_data* contains the bytes for the raw " +"application data. Optional *_subtype* specifies the MIME subtype and " +"defaults to :mimetype:`octet-stream`." msgstr "" #: ../../library/email.mime.rst:121 @@ -194,7 +194,7 @@ msgstr "模組:\\ :mod:`email.mime.audio`" msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEAudio` class is used to create MIME message objects of major type :" -"mimetype:`audio`. *_audiodata* is a string containing the raw audio data. " +"mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. " "If this data can be decoded as au, wav, aiff, or aifc, then the subtype will " "be automatically included in the :mailheader:`Content-Type` header. " "Otherwise you can explicitly specify the audio subtype via the *_subtype* " @@ -222,7 +222,7 @@ msgstr "模組:\\ :mod:`email.mime.image`" msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEImage` class is used to create MIME message objects of major type :" -"mimetype:`image`. *_imagedata* is a string containing the raw image data. " +"mimetype:`image`. *_imagedata* contains the bytes for the raw image data. " "If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm, " "rast, xbm, bmp, webp, and exr attempted), then the subtype will be " "automatically included in the :mailheader:`Content-Type` header. Otherwise " diff --git a/library/enum.po b/library/enum.po index b5b1a9be30..15fbce62af 100644 --- a/library/enum.po +++ b/library/enum.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-04 00:15+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -84,19 +84,19 @@ msgid "Nomenclature" msgstr "" #: ../../library/enum.rst:55 -msgid "The class :class:`Color` is an *enumeration* (or *enum*)" +msgid "The class :class:`!Color` is an *enumeration* (or *enum*)" msgstr "" #: ../../library/enum.rst:56 msgid "" -"The attributes :attr:`Color.RED`, :attr:`Color.GREEN`, etc., are " +"The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are " "*enumeration members* (or *members*) and are functionally constants." msgstr "" #: ../../library/enum.rst:58 msgid "" -"The enum members have *names* and *values* (the name of :attr:`Color.RED` is " -"``RED``, the value of :attr:`Color.BLUE` is ``3``, etc.)" +"The enum members have *names* and *values* (the name of :attr:`!Color.RED` " +"is ``RED``, the value of :attr:`!Color.BLUE` is ``3``, etc.)" msgstr "" #: ../../library/enum.rst:65 @@ -292,8 +292,8 @@ msgstr "" #: ../../library/enum.rst:168 msgid "" -"*EnumType* is responsible for setting the correct :meth:`__repr__`, :meth:" -"`__str__`, :meth:`__format__`, and :meth:`__reduce__` methods on the final " +"*EnumType* is responsible for setting the correct :meth:`!__repr__`, :meth:`!" +"__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the final " "*enum*, as well as creating the enum members, properly handling duplicates, " "providing iteration over the enum class, etc." msgstr "" @@ -548,9 +548,9 @@ msgstr "" #: ../../library/enum.rst:425 msgid "" -":meth:`__str__` is now :func:`int.__str__` to better support the " -"*replacement of existing constants* use-case. :meth:`__format__` was " -"already :func:`int.__format__` for that same reason." +":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " +"*replacement of existing constants* use-case. :meth:`~object.__format__` was " +"already :meth:`!int.__format__` for that same reason." msgstr "" #: ../../library/enum.rst:432 @@ -693,7 +693,7 @@ msgstr "" #: ../../library/enum.rst:616 msgid "" -":class:`!ReprEum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, " +":class:`!ReprEnum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, " "but the :class:`str() <str>` of the mixed-in data type:" msgstr "" @@ -775,15 +775,15 @@ msgstr "" #: ../../library/enum.rst:756 msgid "" -":attr:`__members__` is a read-only ordered mapping of ``member_name``:" -"``member`` items. It is only available on the class." +":attr:`~EnumType.__members__` is a read-only ordered mapping of " +"``member_name``:``member`` items. It is only available on the class." msgstr "" #: ../../library/enum.rst:759 msgid "" -":meth:`__new__`, if specified, must create and return the enum members; it " -"is also a very good idea to set the member's :attr:`_value_` appropriately. " -"Once all the members are created it is no longer used." +":meth:`~object.__new__`, if specified, must create and return the enum " +"members; it is also a very good idea to set the member's :attr:`!_value_` " +"appropriately. Once all the members are created it is no longer used." msgstr "" #: ../../library/enum.rst:765 @@ -851,12 +851,12 @@ msgstr "" #: ../../library/enum.rst:798 msgid "" "*auto* can be used in place of a value. If used, the *Enum* machinery will " -"call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. " -"For *Enum* and *IntEnum* that appropriate value will be the last value plus " -"one; for *Flag* and *IntFlag* it will be the first power-of-two greater than " -"the highest value; for *StrEnum* it will be the lower-cased version of the " -"member's name. Care must be taken if mixing *auto()* with manually " -"specified values." +"call an *Enum*'s :meth:`~Enum._generate_next_value_` to get an appropriate " +"value. For *Enum* and *IntEnum* that appropriate value will be the last " +"value plus one; for *Flag* and *IntFlag* it will be the first power-of-two " +"greater than the highest value; for *StrEnum* it will be the lower-cased " +"version of the member's name. Care must be taken if mixing *auto()* with " +"manually specified values." msgstr "" #: ../../library/enum.rst:806 @@ -898,8 +898,8 @@ msgstr "" #: ../../library/enum.rst:822 msgid "" -"in 3.13 the default ``\"generate_next_value_`` will always return the " -"highest member value incremented by 1, and will fail if any member is an " +"in 3.13 the default ``_generate_next_value_`` will always return the highest " +"member value incremented by 1, and will fail if any member is an " "incompatible type." msgstr "" @@ -921,8 +921,8 @@ msgstr "" #: ../../library/enum.rst:841 msgid "" "A :keyword:`class` decorator specifically for enumerations. It searches an " -"enumeration's :attr:`__members__`, gathering any aliases it finds; if any " -"are found :exc:`ValueError` is raised with the details::" +"enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; " +"if any are found :exc:`ValueError` is raised with the details::" msgstr "" #: ../../library/enum.rst:859 diff --git a/library/optparse.po b/library/optparse.po index 2699c5116f..d5803d16c8 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-06 00:17+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -152,8 +152,8 @@ msgstr "" #: ../../library/optparse.rst:125 msgid "" -"a plus sign followed by a single letter, or a few letters, or a word, e.g. ``" -"+f``, ``+rgb``" +"a plus sign followed by a single letter, or a few letters, or a word, e.g. " +"``+f``, ``+rgb``" msgstr "" #: ../../library/optparse.rst:128 @@ -527,7 +527,7 @@ msgid "``\"store_const\"``" msgstr "``\"store_const\"``" #: ../../library/optparse.rst:407 ../../library/optparse.rst:928 -msgid "store a constant value" +msgid "store a constant value, pre-set via :attr:`Option.const`" msgstr "" #: ../../library/optparse.rst:410 ../../library/optparse.rst:937 @@ -566,10 +566,10 @@ msgstr "" #: ../../library/optparse.rst:427 msgid "" -"All of the above examples involve setting some variable (the \"destination" -"\") when certain command-line options are seen. What happens if those " -"options are never seen? Since we didn't supply any defaults, they are all " -"set to ``None``. This is usually fine, but sometimes you want more " +"All of the above examples involve setting some variable (the " +"\"destination\") when certain command-line options are seen. What happens " +"if those options are never seen? Since we didn't supply any defaults, they " +"are all set to ``None``. This is usually fine, but sometimes you want more " "control. :mod:`optparse` lets you supply a default value for each " "destination, which is assigned before the command line is parsed." msgstr "" @@ -813,8 +813,8 @@ msgstr "" #: ../../library/optparse.rst:692 msgid "" "Print the version message for the current program (``self.version``) to " -"*file* (default stdout). As with :meth:`print_usage`, any occurrence of ``" -"%prog`` in ``self.version`` is replaced with the name of the current " +"*file* (default stdout). As with :meth:`print_usage`, any occurrence of " +"``%prog`` in ``self.version`` is replaced with the name of the current " "program. Does nothing if ``self.version`` is empty or undefined." msgstr "" @@ -916,8 +916,8 @@ msgstr "" #: ../../library/optparse.rst:810 msgid "" "The usage summary to print when your program is run incorrectly or with a " -"help option. When :mod:`optparse` prints the usage string, it expands ``" -"%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed " +"help option. When :mod:`optparse` prints the usage string, it expands " +"``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed " "that keyword argument). To suppress a usage message, pass the special " "value :data:`optparse.SUPPRESS_USAGE`." msgstr "" @@ -951,8 +951,8 @@ msgstr "" msgid "" "A version string to print when the user supplies a version option. If you " "supply a true value for ``version``, :mod:`optparse` automatically adds a " -"version option with the single option string ``--version``. The substring ``" -"%prog`` is expanded the same as for ``usage``." +"version option with the single option string ``--version``. The substring " +"``%prog`` is expanded the same as for ``usage``." msgstr "" #: ../../library/optparse.rst:835 @@ -1123,7 +1123,7 @@ msgid "``\"append_const\"``" msgstr "``\"append_const\"``" #: ../../library/optparse.rst:940 -msgid "append a constant value to a list" +msgid "append a constant value to a list, pre-set via :attr:`Option.const`" msgstr "" #: ../../library/optparse.rst:949 ../../library/optparse.rst:1226 @@ -1214,8 +1214,8 @@ msgstr "" #: ../../library/optparse.rst:1011 msgid "" -"The argument type expected by this option (e.g., ``\"string\"`` or ``\"int" -"\"``); the available option types are documented :ref:`here <optparse-" +"The argument type expected by this option (e.g., ``\"string\"`` or " +"``\"int\"``); the available option types are documented :ref:`here <optparse-" "standard-option-types>`." msgstr "" @@ -1770,11 +1770,11 @@ msgstr "" #: ../../library/optparse.rst:1452 msgid "" "At this point, :mod:`optparse` detects that a previously added option is " -"already using the ``-n`` option string. Since ``conflict_handler`` is ``" -"\"resolve\"``, it resolves the situation by removing ``-n`` from the earlier " -"option's list of option strings. Now ``--dry-run`` is the only way for the " -"user to activate that option. If the user asks for help, the help message " -"will reflect that::" +"already using the ``-n`` option string. Since ``conflict_handler`` is " +"``\"resolve\"``, it resolves the situation by removing ``-n`` from the " +"earlier option's list of option strings. Now ``--dry-run`` is the only way " +"for the user to activate that option. If the user asks for help, the help " +"message will reflect that::" msgstr "" #: ../../library/optparse.rst:1463 @@ -1982,8 +1982,8 @@ msgid "" "is the option string seen on the command-line that's triggering the " "callback. (If an abbreviated long option was used, ``opt_str`` will be the " "full, canonical option string---e.g. if the user puts ``--foo`` on the " -"command-line as an abbreviation for ``--foobar``, then ``opt_str`` will be ``" -"\"--foobar\"``.)" +"command-line as an abbreviation for ``--foobar``, then ``opt_str`` will be " +"``\"--foobar\"``.)" msgstr "" #: ../../library/optparse.rst:1637 @@ -2333,10 +2333,10 @@ msgstr "" #: ../../library/optparse.rst:1950 msgid "" -"These are overlapping sets: some default \"store\" actions are ``\"store" -"\"``, ``\"store_const\"``, ``\"append\"``, and ``\"count\"``, while the " -"default \"typed\" actions are ``\"store\"``, ``\"append\"``, and ``\"callback" -"\"``." +"These are overlapping sets: some default \"store\" actions are " +"``\"store\"``, ``\"store_const\"``, ``\"append\"``, and ``\"count\"``, while " +"the default \"typed\" actions are ``\"store\"``, ``\"append\"``, and " +"``\"callback\"``." msgstr "" #: ../../library/optparse.rst:1954 @@ -2425,11 +2425,11 @@ msgstr "" msgid "" "If the ``attr`` attribute of ``values`` doesn't exist or is ``None``, then " "ensure_value() first sets it to ``value``, and then returns 'value. This is " -"very handy for actions like ``\"extend\"``, ``\"append\"``, and ``\"count" -"\"``, all of which accumulate data in a variable and expect that variable to " -"be of a certain type (a list for the first two, an integer for the latter). " -"Using :meth:`ensure_value` means that scripts using your action don't have " -"to worry about setting a default value for the option destinations in " -"question; they can just leave the default as ``None`` and :meth:" -"`ensure_value` will take care of getting it right when it's needed." +"very handy for actions like ``\"extend\"``, ``\"append\"``, and " +"``\"count\"``, all of which accumulate data in a variable and expect that " +"variable to be of a certain type (a list for the first two, an integer for " +"the latter). Using :meth:`ensure_value` means that scripts using your " +"action don't have to worry about setting a default value for the option " +"destinations in question; they can just leave the default as ``None`` and :" +"meth:`ensure_value` will take care of getting it right when it's needed." msgstr "" diff --git a/library/pathlib.po b/library/pathlib.po index acec6f16a4..388563f8a7 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-06 03:11+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1159,16 +1159,16 @@ msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" #: ../../library/pathlib.rst:1326 -msgid ":data:`PurePath.name`" -msgstr ":data:`PurePath.name`" +msgid ":attr:`PurePath.name`" +msgstr ":attr:`PurePath.name`" #: ../../library/pathlib.rst:1327 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" #: ../../library/pathlib.rst:1327 -msgid ":data:`PurePath.parent`" -msgstr ":data:`PurePath.parent`" +msgid ":attr:`PurePath.parent`" +msgstr ":attr:`PurePath.parent`" #: ../../library/pathlib.rst:1328 msgid ":func:`os.path.samefile`" @@ -1183,8 +1183,8 @@ msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" #: ../../library/pathlib.rst:1329 -msgid ":data:`PurePath.stem` and :data:`PurePath.suffix`" -msgstr ":data:`PurePath.stem` 和 :data:`PurePath.suffix`" +msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" +msgstr ":attr:`PurePath.stem` 和 :attr:`PurePath.suffix`" #: ../../library/pathlib.rst:1334 msgid "Footnotes" diff --git a/library/random.po b/library/random.po index 1a372a270c..86c00f1fd2 100644 --- a/library/random.po +++ b/library/random.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" -"PO-Revision-Date: 2022-10-16 06:34+0800\n" +"POT-Creation-Date: 2023-01-23 00:16+0000\n" +"PO-Revision-Date: 2023-01-23 22:47+0800\n" "Last-Translator: Allen Wu <allen91.wu@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.1.1\n" +"X-Generator: Poedit 3.2.2\n" #: ../../library/random.rst:2 msgid ":mod:`random` --- Generate pseudo-random numbers" @@ -58,20 +58,20 @@ msgstr "" #: ../../library/random.rst:23 msgid "" "Almost all module functions depend on the basic function :func:`.random`, " -"which generates a random float uniformly in the semi-open range [0.0, 1.0). " -"Python uses the Mersenne Twister as the core generator. It produces 53-bit " -"precision floats and has a period of 2\\*\\*19937-1. The underlying " +"which generates a random float uniformly in the half-open range ``0.0 <= X < " +"1.0``. Python uses the Mersenne Twister as the core generator. It produces " +"53-bit precision floats and has a period of 2\\*\\*19937-1. The underlying " "implementation in C is both fast and threadsafe. The Mersenne Twister is " "one of the most extensively tested random number generators in existence. " "However, being completely deterministic, it is not suitable for all " "purposes, and is completely unsuitable for cryptographic purposes." msgstr "" "幾乎所有 module 函式都相依於基本函式 :func:`.random`,此函式在半開放範圍 " -"[0.0, 1.0) 內均勻地生成一個隨機 float(浮點數)。Python 使用 Mersenne " -"Twister(梅森旋轉演算法)作為核心的產生器,它產生 53 位元精度 float,其週期" -"為 2\\*\\*19937-1,透過 C 語言進行底層的實作既快速又支援執行緒安全 " -"(threadsafe)。Mersenne Twister 是現存最廣泛被驗證的隨機數產生器之一,但是基於" -"完全確定性,它並不適合所有目的,並且完全不適合加密目的。" +"``0.0 <= X < 1.0`` 內均勻地生成一個隨機 float(浮點數)。Python 使用 " +"Mersenne Twister(梅森旋轉演算法)作為核心的產生器,它產生 53 位元精度 " +"float,其週期為 2\\*\\*19937-1,透過 C 語言進行底層的實作既快速又支援執行緒安" +"全 (threadsafe)。Mersenne Twister 是現存最廣泛被驗證的隨機數產生器之一,但是" +"基於完全確定性,它並不適合所有目的,並且完全不適合加密目的。" #: ../../library/random.rst:32 msgid "" @@ -478,8 +478,9 @@ msgstr "" "實踐所示;這些方程式中的大多數都可以在任意統計文本中找到。" #: ../../library/random.rst:276 -msgid "Return the next random floating point number in the range [0.0, 1.0)." -msgstr "回傳範圍 [0.0, 1.0) 中的下一個隨機浮點數。" +msgid "" +"Return the next random floating point number in the range ``0.0 <= X < 1.0``" +msgstr "回傳範圍 ``0.0 <= X < 1.0`` 中的下一個隨機浮點數" #: ../../library/random.rst:281 msgid "" diff --git a/library/sqlite3.po b/library/sqlite3.po index 0dbc82d770..33d08f519e 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-02 00:15+0000\n" +"POT-Creation-Date: 2023-01-19 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1759,29 +1759,38 @@ msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " "values into the query by providing them as a :class:`tuple` of values to the " -"second argument of the cursor's :meth:`~Cursor.execute` method. An SQL " -"statement may use one of two kinds of placeholders: question marks (qmark " -"style) or named placeholders (named style). For the qmark style, " -"``parameters`` must be a :term:`sequence <sequence>`. For the named style, " -"it can be either a :term:`sequence <sequence>` or :class:`dict` instance. " -"The length of the :term:`sequence <sequence>` must match the number of " -"placeholders, or a :exc:`ProgrammingError` is raised. If a :class:`dict` is " -"given, it must contain keys for all named parameters. Any extra items are " -"ignored. Here's an example of both styles:" +"second argument of the cursor's :meth:`~Cursor.execute` method." +msgstr "" + +#: ../../library/sqlite3.rst:1828 +msgid "" +"An SQL statement may use one of two kinds of placeholders: question marks " +"(qmark style) or named placeholders (named style). For the qmark style, " +"*parameters* must be a :term:`sequence` whose length must match the number " +"of placeholders, or a :exc:`ProgrammingError` is raised. For the named " +"style, *parameters* should be an instance of a :class:`dict` (or a " +"subclass), which must contain keys for all named parameters; any extra items " +"are ignored. Here's an example of both styles:" msgstr "" #: ../../library/sqlite3.rst:1865 +msgid "" +":pep:`249` numeric placeholders are *not* supported. If used, they will be " +"interpreted as named placeholders." +msgstr "" + +#: ../../library/sqlite3.rst:1872 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:1867 +#: ../../library/sqlite3.rst:1874 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands <sqlite3-types>`." msgstr "" -#: ../../library/sqlite3.rst:1871 +#: ../../library/sqlite3.rst:1878 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -1791,11 +1800,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1883 +#: ../../library/sqlite3.rst:1890 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:1885 +#: ../../library/sqlite3.rst:1892 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -1805,84 +1814,84 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1916 +#: ../../library/sqlite3.rst:1923 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:1918 +#: ../../library/sqlite3.rst:1925 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1948 +#: ../../library/sqlite3.rst:1955 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1950 +#: ../../library/sqlite3.rst:1957 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:1955 +#: ../../library/sqlite3.rst:1962 msgid "" "Let's go back to the :class:`!Point` class. We stored the x and y " "coordinates separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1958 +#: ../../library/sqlite3.rst:1965 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`!Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1963 +#: ../../library/sqlite3.rst:1970 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1972 +#: ../../library/sqlite3.rst:1979 msgid "" "We now need to tell :mod:`!sqlite3` when it should convert a given SQLite " "value. This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:1976 +#: ../../library/sqlite3.rst:1983 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1977 +#: ../../library/sqlite3.rst:1984 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1978 +#: ../../library/sqlite3.rst:1985 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1982 +#: ../../library/sqlite3.rst:1989 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:2033 +#: ../../library/sqlite3.rst:2040 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:2035 +#: ../../library/sqlite3.rst:2042 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:2097 +#: ../../library/sqlite3.rst:2104 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:2099 +#: ../../library/sqlite3.rst:2106 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -1894,11 +1903,11 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:2140 +#: ../../library/sqlite3.rst:2147 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:2142 +#: ../../library/sqlite3.rst:2149 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1908,58 +1917,58 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:2151 +#: ../../library/sqlite3.rst:2158 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, the context manager is a no-op." msgstr "" -#: ../../library/sqlite3.rst:2156 +#: ../../library/sqlite3.rst:2163 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:2189 +#: ../../library/sqlite3.rst:2196 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:2191 +#: ../../library/sqlite3.rst:2198 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:2193 +#: ../../library/sqlite3.rst:2200 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:2202 +#: ../../library/sqlite3.rst:2209 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:" msgstr "" -#: ../../library/sqlite3.rst:2212 +#: ../../library/sqlite3.rst:2219 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:2226 +#: ../../library/sqlite3.rst:2233 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:2235 +#: ../../library/sqlite3.rst:2242 msgid "How to create and use row factories" msgstr "" -#: ../../library/sqlite3.rst:2237 +#: ../../library/sqlite3.rst:2244 msgid "" "By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" -#: ../../library/sqlite3.rst:2242 +#: ../../library/sqlite3.rst:2249 msgid "" "While :attr:`!row_factory` exists as an attribute both on the :class:" "`Cursor` and the :class:`Connection`, it is recommended to set :class:" @@ -1967,7 +1976,7 @@ msgid "" "use the same row factory." msgstr "" -#: ../../library/sqlite3.rst:2247 +#: ../../library/sqlite3.rst:2254 msgid "" ":class:`!Row` provides indexed and case-insensitive named access to columns, " "with minimal memory overhead and performance impact over a :class:`!tuple`. " @@ -1975,51 +1984,51 @@ msgid "" "attribute:" msgstr "" -#: ../../library/sqlite3.rst:2257 +#: ../../library/sqlite3.rst:2264 msgid "Queries now return :class:`!Row` objects:" msgstr "" -#: ../../library/sqlite3.rst:2272 +#: ../../library/sqlite3.rst:2279 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" -#: ../../library/sqlite3.rst:2281 +#: ../../library/sqlite3.rst:2288 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2291 +#: ../../library/sqlite3.rst:2298 msgid "The following row factory returns a :term:`named tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2302 +#: ../../library/sqlite3.rst:2309 msgid ":func:`!namedtuple_factory` can be used as follows:" msgstr "" -#: ../../library/sqlite3.rst:2317 +#: ../../library/sqlite3.rst:2324 msgid "" "With some adjustments, the above recipe can be adapted to use a :class:" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" -#: ../../library/sqlite3.rst:2325 +#: ../../library/sqlite3.rst:2332 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:2330 +#: ../../library/sqlite3.rst:2337 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:2332 +#: ../../library/sqlite3.rst:2339 msgid "" "The :mod:`!sqlite3` module does not adhere to the transaction handling " "recommended by :pep:`249`." msgstr "" -#: ../../library/sqlite3.rst:2335 +#: ../../library/sqlite3.rst:2342 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -2033,7 +2042,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:2348 +#: ../../library/sqlite3.rst:2355 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -2043,14 +2052,14 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:2356 +#: ../../library/sqlite3.rst:2363 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: ../../library/sqlite3.rst:2360 +#: ../../library/sqlite3.rst:2367 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." diff --git a/library/ssl.po b/library/ssl.po index 64c59bdae7..8743fbaf13 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -433,8 +433,8 @@ msgstr "" #: ../../library/ssl.rst:405 msgid "" "Return the time in seconds since the Epoch, given the ``cert_time`` string " -"representing the \"notBefore\" or \"notAfter\" date from a certificate in ``" -"\"%b %d %H:%M:%S %Y %Z\"`` strptime format (C locale)." +"representing the \"notBefore\" or \"notAfter\" date from a certificate in " +"``\"%b %d %H:%M:%S %Y %Z\"`` strptime format (C locale)." msgstr "" #: ../../library/ssl.rst:410 @@ -1216,8 +1216,8 @@ msgstr "" #: ../../library/ssl.rst:1143 msgid "" "The :meth:`shutdown` does not reset the socket timeout each time bytes are " -"received or sent. The socket timeout is now to maximum total duration of the " -"shutdown." +"received or sent. The socket timeout is now the maximum total duration of " +"the shutdown." msgstr "" #: ../../library/ssl.rst:1148 @@ -1265,8 +1265,8 @@ msgstr "" #: ../../library/ssl.rst:1177 msgid "" -"The socket timeout is no more reset each time bytes are received or sent. " -"The socket timeout is now to maximum total duration to read up to *len* " +"The socket timeout is no longer reset each time bytes are received or sent. " +"The socket timeout is now the maximum total duration to read up to *len* " "bytes." msgstr "" @@ -1294,8 +1294,8 @@ msgstr "" #: ../../library/ssl.rst:1196 msgid "" -"The socket timeout is no more reset each time bytes are received or sent. " -"The socket timeout is now to maximum total duration to write *buf*." +"The socket timeout is no longer reset each time bytes are received or sent. " +"The socket timeout is now the maximum total duration to write *buf*." msgstr "" #: ../../library/ssl.rst:1200 @@ -1330,8 +1330,8 @@ msgstr "" #: ../../library/ssl.rst:1224 msgid "" -"The socket timeout is no more reset each time bytes are received or sent. " -"The socket timeout is now to maximum total duration of the handshake." +"The socket timeout is no longer reset each time bytes are received or sent. " +"The socket timeout is now the maximum total duration of the handshake." msgstr "" #: ../../library/ssl.rst:1228 @@ -1339,7 +1339,7 @@ msgid "" "Hostname or IP address is matched by OpenSSL during handshake. The function :" "func:`match_hostname` is no longer used. In case OpenSSL refuses a hostname " "or IP address, the handshake is aborted early and a TLS alert message is " -"send to the peer." +"sent to the peer." msgstr "" #: ../../library/ssl.rst:1236 @@ -1520,8 +1520,8 @@ msgstr "" msgid "" "Return the actual SSL protocol version negotiated by the connection as a " "string, or ``None`` if no secure connection is established. As of this " -"writing, possible return values include ``\"SSLv2\"``, ``\"SSLv3\"``, ``" -"\"TLSv1\"``, ``\"TLSv1.1\"`` and ``\"TLSv1.2\"``. Recent OpenSSL versions " +"writing, possible return values include ``\"SSLv2\"``, ``\"SSLv3\"``, " +"``\"TLSv1\"``, ``\"TLSv1.1\"`` and ``\"TLSv1.2\"``. Recent OpenSSL versions " "may define more return values." msgstr "" @@ -2356,9 +2356,9 @@ msgstr "" #: ../../library/ssl.rst:2122 msgid "" -"Python uses files to contain certificates. They should be formatted as \"PEM" -"\" (see :rfc:`1422`), which is a base-64 encoded form wrapped with a header " -"line and a footer line::" +"Python uses files to contain certificates. They should be formatted as " +"\"PEM\" (see :rfc:`1422`), which is a base-64 encoded form wrapped with a " +"header line and a footer line::" msgstr "" #: ../../library/ssl.rst:2131 diff --git a/library/sys.po b/library/sys.po index 1cadd66e8a..f6ee2572ac 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-12 06:58+0000\n" +"POT-Creation-Date: 2023-01-13 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2583,9 +2583,9 @@ msgstr "" msgid "" "The version number used to form registry keys on Windows platforms. This is " "stored as string resource 1000 in the Python DLL. The value is normally the " -"first three characters of :const:`version`. It is provided in the :mod:" -"`sys` module for informational purposes; modifying this value has no effect " -"on the registry keys used by Python." +"major and minor versions of the running Python interpreter. It is provided " +"in the :mod:`sys` module for informational purposes; modifying this value " +"has no effect on the registry keys used by Python." msgstr "" #: ../../library/sys.rst:1817 diff --git a/library/zipfile.po b/library/zipfile.po index 67de71aaca..6fd3c7394d 100644 --- a/library/zipfile.po +++ b/library/zipfile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-18 00:16+0000\n" +"POT-Creation-Date: 2023-01-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -205,7 +205,7 @@ msgid "" "accepted (see :class:`bz2 <bz2.BZ2File>` for more information)." msgstr "" -#: ../../library/zipfile.rst:181 ../../library/zipfile.rst:721 +#: ../../library/zipfile.rst:181 ../../library/zipfile.rst:733 msgid "" "The *strict_timestamps* argument, when set to ``False``, allows to zip files " "older than 1980-01-01 at the cost of setting the timestamp to 1980-01-01. " @@ -258,7 +258,7 @@ msgstr "" msgid "Added support for :mod:`bzip2 <bz2>` and :mod:`lzma` compression." msgstr "" -#: ../../library/zipfile.rst:221 ../../library/zipfile.rst:635 +#: ../../library/zipfile.rst:221 ../../library/zipfile.rst:647 msgid "ZIP64 extensions are enabled by default." msgstr "" @@ -282,7 +282,7 @@ msgstr "" msgid "Add the *compresslevel* parameter." msgstr "" -#: ../../library/zipfile.rst:238 ../../library/zipfile.rst:732 +#: ../../library/zipfile.rst:238 ../../library/zipfile.rst:744 msgid "The *strict_timestamps* keyword-only argument" msgstr "" @@ -643,117 +643,125 @@ msgid "" "Added support for text and binary modes for open. Default mode is now text." msgstr "" -#: ../../library/zipfile.rst:556 +#: ../../library/zipfile.rst:554 ../../library/zipfile.rst:605 +msgid "" +"The ``encoding`` parameter can be supplied as a positional argument without " +"causing a :exc:`TypeError`. As it could in 3.9. Code needing to be " +"compatible with unpatched 3.10 and 3.11 versions must pass all :class:`io." +"TextIOWrapper` arguments, ``encoding`` included, as keywords." +msgstr "" + +#: ../../library/zipfile.rst:562 msgid "Enumerate the children of the current directory." msgstr "" -#: ../../library/zipfile.rst:560 +#: ../../library/zipfile.rst:566 msgid "Return ``True`` if the current context references a directory." msgstr "" -#: ../../library/zipfile.rst:564 +#: ../../library/zipfile.rst:570 msgid "Return ``True`` if the current context references a file." msgstr "" -#: ../../library/zipfile.rst:568 +#: ../../library/zipfile.rst:574 msgid "" "Return ``True`` if the current context references a file or directory in the " "zip file." msgstr "" -#: ../../library/zipfile.rst:573 +#: ../../library/zipfile.rst:579 msgid "The file extension of the final component." msgstr "" -#: ../../library/zipfile.rst:575 +#: ../../library/zipfile.rst:581 msgid "Added :data:`Path.suffix` property." msgstr "" -#: ../../library/zipfile.rst:580 +#: ../../library/zipfile.rst:586 msgid "The final path component, without its suffix." msgstr "" -#: ../../library/zipfile.rst:582 +#: ../../library/zipfile.rst:588 msgid "Added :data:`Path.stem` property." msgstr "" -#: ../../library/zipfile.rst:587 +#: ../../library/zipfile.rst:593 msgid "A list of the path’s file extensions." msgstr "" -#: ../../library/zipfile.rst:589 +#: ../../library/zipfile.rst:595 msgid "Added :data:`Path.suffixes` property." msgstr "" -#: ../../library/zipfile.rst:594 +#: ../../library/zipfile.rst:600 msgid "" "Read the current file as unicode text. Positional and keyword arguments are " "passed through to :class:`io.TextIOWrapper` (except ``buffer``, which is " "implied by the context)." msgstr "" -#: ../../library/zipfile.rst:601 +#: ../../library/zipfile.rst:613 msgid "Read the current file as bytes." msgstr "" -#: ../../library/zipfile.rst:605 +#: ../../library/zipfile.rst:617 msgid "" "Return a new Path object with each of the *other* arguments joined. The " "following are equivalent::" msgstr "" -#: ../../library/zipfile.rst:612 +#: ../../library/zipfile.rst:624 msgid "" "Prior to 3.10, ``joinpath`` was undocumented and accepted exactly one " "parameter." msgstr "" -#: ../../library/zipfile.rst:616 +#: ../../library/zipfile.rst:628 msgid "" "The `zipp <https://pypi.org/project/zipp>`_ project provides backports of " "the latest path object functionality to older Pythons. Use ``zipp.Path`` in " "place of ``zipfile.Path`` for early access to changes." msgstr "" -#: ../../library/zipfile.rst:624 +#: ../../library/zipfile.rst:636 msgid "PyZipFile Objects" msgstr "PyZipFile 物件" -#: ../../library/zipfile.rst:626 +#: ../../library/zipfile.rst:638 msgid "" "The :class:`PyZipFile` constructor takes the same parameters as the :class:" "`ZipFile` constructor, and one additional parameter, *optimize*." msgstr "" -#: ../../library/zipfile.rst:632 +#: ../../library/zipfile.rst:644 msgid "The *optimize* parameter." msgstr "*optimize* 參數。" -#: ../../library/zipfile.rst:638 +#: ../../library/zipfile.rst:650 msgid "" "Instances have one method in addition to those of :class:`ZipFile` objects:" msgstr "" -#: ../../library/zipfile.rst:642 +#: ../../library/zipfile.rst:654 msgid "" "Search for files :file:`\\*.py` and add the corresponding file to the " "archive." msgstr "" -#: ../../library/zipfile.rst:645 +#: ../../library/zipfile.rst:657 msgid "" "If the *optimize* parameter to :class:`PyZipFile` was not given or ``-1``, " "the corresponding file is a :file:`\\*.pyc` file, compiling if necessary." msgstr "" -#: ../../library/zipfile.rst:648 +#: ../../library/zipfile.rst:660 msgid "" "If the *optimize* parameter to :class:`PyZipFile` was ``0``, ``1`` or ``2``, " "only files with that optimization level (see :func:`compile`) are added to " "the archive, compiling if necessary." msgstr "" -#: ../../library/zipfile.rst:652 +#: ../../library/zipfile.rst:664 msgid "" "If *pathname* is a file, the filename must end with :file:`.py`, and just " "the (corresponding :file:`\\*.pyc`) file is added at the top level (no path " @@ -766,11 +774,11 @@ msgid "" "in sorted order." msgstr "" -#: ../../library/zipfile.rst:662 +#: ../../library/zipfile.rst:674 msgid "*basename* is intended for internal use only." msgstr "" -#: ../../library/zipfile.rst:664 +#: ../../library/zipfile.rst:676 msgid "" "*filterfunc*, if given, must be a function taking a single string argument. " "It will be passed each path (including each individual full file path) " @@ -781,286 +789,286 @@ msgid "" "exclude them::" msgstr "" -#: ../../library/zipfile.rst:678 +#: ../../library/zipfile.rst:690 msgid "The :meth:`writepy` method makes archives with file names like this::" msgstr "" -#: ../../library/zipfile.rst:687 +#: ../../library/zipfile.rst:699 msgid "The *filterfunc* parameter." msgstr "*filterfunc* 參數。" -#: ../../library/zipfile.rst:690 +#: ../../library/zipfile.rst:702 msgid "The *pathname* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:693 +#: ../../library/zipfile.rst:705 msgid "Recursion sorts directory entries." msgstr "" -#: ../../library/zipfile.rst:700 +#: ../../library/zipfile.rst:712 msgid "ZipInfo Objects" msgstr "ZipInfo 物件" -#: ../../library/zipfile.rst:702 +#: ../../library/zipfile.rst:714 msgid "" "Instances of the :class:`ZipInfo` class are returned by the :meth:`.getinfo` " "and :meth:`.infolist` methods of :class:`ZipFile` objects. Each object " "stores information about a single member of the ZIP archive." msgstr "" -#: ../../library/zipfile.rst:706 +#: ../../library/zipfile.rst:718 msgid "" "There is one classmethod to make a :class:`ZipInfo` instance for a " "filesystem file:" msgstr "" -#: ../../library/zipfile.rst:712 +#: ../../library/zipfile.rst:724 msgid "" "Construct a :class:`ZipInfo` instance for a file on the filesystem, in " "preparation for adding it to a zip file." msgstr "" -#: ../../library/zipfile.rst:715 +#: ../../library/zipfile.rst:727 msgid "*filename* should be the path to a file or directory on the filesystem." msgstr "" -#: ../../library/zipfile.rst:717 +#: ../../library/zipfile.rst:729 msgid "" "If *arcname* is specified, it is used as the name within the archive. If " "*arcname* is not specified, the name will be the same as *filename*, but " "with any drive letter and leading path separators removed." msgstr "" -#: ../../library/zipfile.rst:729 +#: ../../library/zipfile.rst:741 msgid "The *filename* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:736 +#: ../../library/zipfile.rst:748 msgid "Instances have the following methods and attributes:" msgstr "" -#: ../../library/zipfile.rst:740 +#: ../../library/zipfile.rst:752 msgid "Return ``True`` if this archive member is a directory." msgstr "" -#: ../../library/zipfile.rst:742 +#: ../../library/zipfile.rst:754 msgid "This uses the entry's name: directories should always end with ``/``." msgstr "" -#: ../../library/zipfile.rst:749 +#: ../../library/zipfile.rst:761 msgid "Name of the file in the archive." msgstr "" -#: ../../library/zipfile.rst:754 +#: ../../library/zipfile.rst:766 msgid "" "The time and date of the last modification to the archive member. This is a " "tuple of six values:" msgstr "" -#: ../../library/zipfile.rst:758 +#: ../../library/zipfile.rst:770 msgid "Index" msgstr "" -#: ../../library/zipfile.rst:758 +#: ../../library/zipfile.rst:770 msgid "Value" msgstr "" -#: ../../library/zipfile.rst:760 +#: ../../library/zipfile.rst:772 msgid "``0``" msgstr "``0``" -#: ../../library/zipfile.rst:760 +#: ../../library/zipfile.rst:772 msgid "Year (>= 1980)" msgstr "" -#: ../../library/zipfile.rst:762 +#: ../../library/zipfile.rst:774 msgid "``1``" msgstr "``1``" -#: ../../library/zipfile.rst:762 +#: ../../library/zipfile.rst:774 msgid "Month (one-based)" msgstr "" -#: ../../library/zipfile.rst:764 +#: ../../library/zipfile.rst:776 msgid "``2``" msgstr "``2``" -#: ../../library/zipfile.rst:764 +#: ../../library/zipfile.rst:776 msgid "Day of month (one-based)" msgstr "" -#: ../../library/zipfile.rst:766 +#: ../../library/zipfile.rst:778 msgid "``3``" msgstr "``3``" -#: ../../library/zipfile.rst:766 +#: ../../library/zipfile.rst:778 msgid "Hours (zero-based)" msgstr "" -#: ../../library/zipfile.rst:768 +#: ../../library/zipfile.rst:780 msgid "``4``" msgstr "``4``" -#: ../../library/zipfile.rst:768 +#: ../../library/zipfile.rst:780 msgid "Minutes (zero-based)" msgstr "" -#: ../../library/zipfile.rst:770 +#: ../../library/zipfile.rst:782 msgid "``5``" msgstr "``5``" -#: ../../library/zipfile.rst:770 +#: ../../library/zipfile.rst:782 msgid "Seconds (zero-based)" msgstr "" -#: ../../library/zipfile.rst:775 +#: ../../library/zipfile.rst:787 msgid "The ZIP file format does not support timestamps before 1980." msgstr "" -#: ../../library/zipfile.rst:780 +#: ../../library/zipfile.rst:792 msgid "Type of compression for the archive member." msgstr "" -#: ../../library/zipfile.rst:785 +#: ../../library/zipfile.rst:797 msgid "Comment for the individual archive member as a :class:`bytes` object." msgstr "" -#: ../../library/zipfile.rst:790 +#: ../../library/zipfile.rst:802 msgid "" "Expansion field data. The `PKZIP Application Note`_ contains some comments " "on the internal structure of the data contained in this :class:`bytes` " "object." msgstr "" -#: ../../library/zipfile.rst:797 +#: ../../library/zipfile.rst:809 msgid "System which created ZIP archive." msgstr "" -#: ../../library/zipfile.rst:802 +#: ../../library/zipfile.rst:814 msgid "PKZIP version which created ZIP archive." msgstr "" -#: ../../library/zipfile.rst:807 +#: ../../library/zipfile.rst:819 msgid "PKZIP version needed to extract archive." msgstr "" -#: ../../library/zipfile.rst:812 +#: ../../library/zipfile.rst:824 msgid "Must be zero." msgstr "" -#: ../../library/zipfile.rst:817 +#: ../../library/zipfile.rst:829 msgid "ZIP flag bits." msgstr "" -#: ../../library/zipfile.rst:822 +#: ../../library/zipfile.rst:834 msgid "Volume number of file header." msgstr "" -#: ../../library/zipfile.rst:827 +#: ../../library/zipfile.rst:839 msgid "Internal attributes." msgstr "" -#: ../../library/zipfile.rst:832 +#: ../../library/zipfile.rst:844 msgid "External file attributes." msgstr "" -#: ../../library/zipfile.rst:837 +#: ../../library/zipfile.rst:849 msgid "Byte offset to the file header." msgstr "" -#: ../../library/zipfile.rst:842 +#: ../../library/zipfile.rst:854 msgid "CRC-32 of the uncompressed file." msgstr "" -#: ../../library/zipfile.rst:847 +#: ../../library/zipfile.rst:859 msgid "Size of the compressed data." msgstr "" -#: ../../library/zipfile.rst:852 +#: ../../library/zipfile.rst:864 msgid "Size of the uncompressed file." msgstr "" -#: ../../library/zipfile.rst:859 +#: ../../library/zipfile.rst:871 msgid "Command-Line Interface" msgstr "" -#: ../../library/zipfile.rst:861 +#: ../../library/zipfile.rst:873 msgid "" "The :mod:`zipfile` module provides a simple command-line interface to " "interact with ZIP archives." msgstr "" -#: ../../library/zipfile.rst:864 +#: ../../library/zipfile.rst:876 msgid "" "If you want to create a new ZIP archive, specify its name after the :option:" "`-c` option and then list the filename(s) that should be included:" msgstr "" -#: ../../library/zipfile.rst:871 +#: ../../library/zipfile.rst:883 msgid "Passing a directory is also acceptable:" msgstr "" -#: ../../library/zipfile.rst:877 +#: ../../library/zipfile.rst:889 msgid "" "If you want to extract a ZIP archive into the specified directory, use the :" "option:`-e` option:" msgstr "" -#: ../../library/zipfile.rst:884 +#: ../../library/zipfile.rst:896 msgid "For a list of the files in a ZIP archive, use the :option:`-l` option:" msgstr "" -#: ../../library/zipfile.rst:892 +#: ../../library/zipfile.rst:904 msgid "Command-line options" msgstr "" -#: ../../library/zipfile.rst:897 +#: ../../library/zipfile.rst:909 msgid "List files in a zipfile." msgstr "" -#: ../../library/zipfile.rst:902 +#: ../../library/zipfile.rst:914 msgid "Create zipfile from source files." msgstr "" -#: ../../library/zipfile.rst:907 +#: ../../library/zipfile.rst:919 msgid "Extract zipfile into target directory." msgstr "" -#: ../../library/zipfile.rst:912 +#: ../../library/zipfile.rst:924 msgid "Test whether the zipfile is valid or not." msgstr "" -#: ../../library/zipfile.rst:916 +#: ../../library/zipfile.rst:928 msgid "" "Specify encoding of member names for :option:`-l`, :option:`-e` and :option:" "`-t`." msgstr "" -#: ../../library/zipfile.rst:923 +#: ../../library/zipfile.rst:935 msgid "Decompression pitfalls" msgstr "" -#: ../../library/zipfile.rst:925 +#: ../../library/zipfile.rst:937 msgid "" "The extraction in zipfile module might fail due to some pitfalls listed " "below." msgstr "" -#: ../../library/zipfile.rst:928 +#: ../../library/zipfile.rst:940 msgid "From file itself" msgstr "" -#: ../../library/zipfile.rst:930 +#: ../../library/zipfile.rst:942 msgid "" "Decompression may fail due to incorrect password / CRC checksum / ZIP format " "or unsupported compression method / decryption." msgstr "" -#: ../../library/zipfile.rst:934 +#: ../../library/zipfile.rst:946 msgid "File System limitations" msgstr "" -#: ../../library/zipfile.rst:936 +#: ../../library/zipfile.rst:948 msgid "" "Exceeding limitations on different file systems can cause decompression " "failed. Such as allowable characters in the directory entries, length of the " @@ -1068,33 +1076,33 @@ msgid "" "files, etc." msgstr "" -#: ../../library/zipfile.rst:943 +#: ../../library/zipfile.rst:955 msgid "Resources limitations" msgstr "" -#: ../../library/zipfile.rst:945 +#: ../../library/zipfile.rst:957 msgid "" "The lack of memory or disk volume would lead to decompression failed. For " "example, decompression bombs (aka `ZIP bomb`_) apply to zipfile library that " "can cause disk volume exhaustion." msgstr "" -#: ../../library/zipfile.rst:950 +#: ../../library/zipfile.rst:962 msgid "Interruption" msgstr "" -#: ../../library/zipfile.rst:952 +#: ../../library/zipfile.rst:964 msgid "" "Interruption during the decompression, such as pressing control-C or killing " "the decompression process may result in incomplete decompression of the " "archive." msgstr "" -#: ../../library/zipfile.rst:956 +#: ../../library/zipfile.rst:968 msgid "Default behaviors of extraction" msgstr "" -#: ../../library/zipfile.rst:958 +#: ../../library/zipfile.rst:970 msgid "" "Not knowing the default extraction behaviors can cause unexpected " "decompression results. For example, when extracting the same archive twice, " diff --git a/using/windows.po b/using/windows.po index 8aba9bd2e9..e46e2c99fe 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-01 00:23+0000\n" +"POT-Creation-Date: 2023-01-17 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -199,8 +199,8 @@ msgid "" "In the latest versions of Windows, this limitation can be expanded to " "approximately 32,000 characters. Your administrator will need to activate " "the \"Enable Win32 long paths\" group policy, or set ``LongPathsEnabled`` to " -"``1`` in the registry key ``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet" -"\\Control\\FileSystem``." +"``1`` in the registry key " +"``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." msgstr "" #: ../../using/windows.rst:110 @@ -245,11 +245,11 @@ msgid "" "list of available options is shown below." msgstr "" -#: ../../using/windows.rst:140 ../../using/windows.rst:1028 +#: ../../using/windows.rst:140 ../../using/windows.rst:1044 msgid "Name" msgstr "" -#: ../../using/windows.rst:140 ../../using/windows.rst:1028 +#: ../../using/windows.rst:140 ../../using/windows.rst:1044 msgid "Description" msgstr "描述" @@ -308,9 +308,9 @@ msgstr "預設安裝目錄給 只有給我 安裝方式" #: ../../using/windows.rst:152 msgid "" -":file:`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY` or :file:`" -"%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-32` or :file:`" -"%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-64`" +":file:`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY` or :file:" +"`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-32` or :file:" +"`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-64`" msgstr "" #: ../../using/windows.rst:162 @@ -686,18 +686,19 @@ msgid "" "At runtime, Python will use a private copy of well-known Windows folders and " "the registry. For example, if the environment variable :envvar:`%APPDATA%` " "is :file:`c:\\\\Users\\\\<user>\\\\AppData\\\\`, then when writing to :file:" -"`C:\\\\Users\\\\<user>\\\\AppData\\\\Local` will write to :file:`C:\\\\Users" -"\\\\<user>\\\\AppData\\\\Local\\\\Packages\\\\PythonSoftwareFoundation." -"Python.3.8_qbz5n2kfra8p0\\\\LocalCache\\\\Local\\\\`." +"`C:\\\\Users\\\\<user>\\\\AppData\\\\Local` will write to :file:`C:\\" +"\\Users\\\\<user>\\\\AppData\\\\Local\\\\Packages\\" +"\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\\\LocalCache\\\\Local\\" +"\\`." msgstr "" #: ../../using/windows.rst:361 msgid "" "When reading files, Windows will return the file from the private folder, or " "if that does not exist, the real Windows directory. For example reading :" -"file:`C:\\\\Windows\\\\System32` returns the contents of :file:`C:\\\\Windows" -"\\\\System32` plus the contents of :file:`C:\\\\Program Files\\\\WindowsApps" -"\\\\package_name\\\\VFS\\\\SystemX86`." +"file:`C:\\\\Windows\\\\System32` returns the contents of :file:`C:\\" +"\\Windows\\\\System32` plus the contents of :file:`C:\\\\Program Files\\" +"\\WindowsApps\\\\package_name\\\\VFS\\\\SystemX86`." msgstr "" #: ../../using/windows.rst:365 @@ -1089,9 +1090,9 @@ msgstr "" #: ../../using/windows.rst:629 msgid "" -"On the first page of the installer, an option labelled \"Add Python to PATH" -"\" may be selected to have the installer add the install location into the :" -"envvar:`PATH`. The location of the :file:`Scripts\\\\` folder is also " +"On the first page of the installer, an option labelled \"Add Python to " +"PATH\" may be selected to have the installer add the install location into " +"the :envvar:`PATH`. The location of the :file:`Scripts\\\\` folder is also " "added. This allows you to type :command:`python` to run the interpreter, " "and :command:`pip` for the package installer. Thus, you can also execute " "your scripts with command line options, see :ref:`using-on-cmdline` " @@ -1344,8 +1345,8 @@ msgid "" msgstr "" #: ../../using/windows.rst:821 -msgid "``/usr/bin/env python``" -msgstr "``/usr/bin/env python``" +msgid "``/usr/bin/env``" +msgstr "``/usr/bin/env``" #: ../../using/windows.rst:822 msgid "``/usr/bin/python``" @@ -1399,18 +1400,31 @@ msgstr "" msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " -"executable :envvar:`PATH` for a Python executable. This corresponds to the " -"behaviour of the Unix ``env`` program, which performs a :envvar:`PATH` " -"search. If an executable matching the first argument after the ``env`` " -"command cannot be found, it will be handled as described below. " -"Additionally, the environment variable :envvar:`PYLAUNCHER_NO_SEARCH_PATH` " -"may be set (to any value) to skip this additional search." +"executable :envvar:`PATH` for a Python executable matching the name provided " +"as the first argument. This corresponds to the behaviour of the Unix ``env`` " +"program, which performs a :envvar:`PATH` search. If an executable matching " +"the first argument after the ``env`` command cannot be found, but the " +"argument starts with ``python``, it will be handled as described for the " +"other virtual commands. The environment variable :envvar:" +"`PYLAUNCHER_NO_SEARCH_PATH` may be set (to any value) to skip this search " +"of :envvar:`PATH`." msgstr "" -#: ../../using/windows.rst:865 +#: ../../using/windows.rst:867 msgid "" -"Shebang lines that do not match any of these patterns are treated as " -"**Windows** paths that are absolute or relative to the directory containing " +"Shebang lines that do not match any of these patterns are looked up in the " +"``[commands]`` section of the launcher's :ref:`.INI file <launcher-ini>`. " +"This may be used to handle certain commands in a way that makes sense for " +"your system. The name of the command must be a single argument (no spaces in " +"the shebang executable), and the value substituted is the full path to the " +"executable (additional arguments specified in the .INI will be quoted as " +"part of the filename)." +msgstr "" + +#: ../../using/windows.rst:880 +msgid "" +"Any commands not found in the .INI file are treated as **Windows** " +"executable paths that are absolute or relative to the directory containing " "the script file. This is a convenience for Windows-only scripts, such as " "those generated by an installer, since the behavior is not compatible with " "Unix-style shells. These paths may be quoted, and may include multiple " @@ -1418,39 +1432,38 @@ msgid "" "will be appended." msgstr "" -#: ../../using/windows.rst:874 +#: ../../using/windows.rst:889 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:876 +#: ../../using/windows.rst:891 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:883 +#: ../../using/windows.rst:898 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:886 +#: ../../using/windows.rst:901 msgid "Customization" msgstr "" -#: ../../using/windows.rst:889 +#: ../../using/windows.rst:906 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:891 +#: ../../using/windows.rst:908 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " -"user's \"application data\" directory (i.e. the directory returned by " -"calling the Windows function ``SHGetFolderPath`` with " -"``CSIDL_LOCAL_APPDATA``) and ``py.ini`` in the same directory as the " -"launcher. The same .ini files are used for both the 'console' version of the " -"launcher (i.e. py.exe) and for the 'windows' version (i.e. pyw.exe)." +"user's application data directory (``%LOCALAPPDATA%`` or ``$env:" +"LocalAppData``) and ``py.ini`` in the same directory as the launcher. The " +"same .ini files are used for both the 'console' version of the launcher (i." +"e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:898 +#: ../../using/windows.rst:914 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -1458,11 +1471,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:903 +#: ../../using/windows.rst:919 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:905 +#: ../../using/windows.rst:921 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -1472,13 +1485,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:911 +#: ../../using/windows.rst:927 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:914 +#: ../../using/windows.rst:930 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`PY_PYTHON` can be set to specify the default version qualifier. If " @@ -1488,7 +1501,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:921 +#: ../../using/windows.rst:937 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -1499,7 +1512,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:929 +#: ../../using/windows.rst:945 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -1513,30 +1526,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:940 +#: ../../using/windows.rst:956 msgid "Examples:" msgstr "範例:" -#: ../../using/windows.rst:942 +#: ../../using/windows.rst:958 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:946 +#: ../../using/windows.rst:962 msgid "" "The command ``python3.7`` will not consult any options at all as the " "versions are fully specified." msgstr "" -#: ../../using/windows.rst:949 +#: ../../using/windows.rst:965 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:952 +#: ../../using/windows.rst:968 msgid "" "If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " "implementation of 3.7 whereas the command ``python3`` will use the latest " @@ -1544,13 +1557,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:957 +#: ../../using/windows.rst:973 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " "``python3`` will both use specifically 3.7" msgstr "" -#: ../../using/windows.rst:960 +#: ../../using/windows.rst:976 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -1560,25 +1573,25 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:967 +#: ../../using/windows.rst:983 msgid "For example:" msgstr "" -#: ../../using/windows.rst:969 +#: ../../using/windows.rst:985 msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:976 +#: ../../using/windows.rst:992 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:986 +#: ../../using/windows.rst:1002 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:988 +#: ../../using/windows.rst:1004 msgid "" "If an environment variable :envvar:`PYLAUNCHER_DEBUG` is set (to any value), " "the launcher will print diagnostic information to stderr (i.e. to the " @@ -1588,11 +1601,11 @@ msgid "" "the target Python. It is primarily intended for testing and debugging." msgstr "" -#: ../../using/windows.rst:996 +#: ../../using/windows.rst:1012 msgid "Dry Run" msgstr "" -#: ../../using/windows.rst:998 +#: ../../using/windows.rst:1014 msgid "" "If an environment variable :envvar:`PYLAUNCHER_DRYRUN` is set (to any " "value), the launcher will output the command it would have run, but will not " @@ -1602,11 +1615,11 @@ msgid "" "correctly in the console." msgstr "" -#: ../../using/windows.rst:1006 +#: ../../using/windows.rst:1022 msgid "Install on demand" msgstr "安裝隨選" -#: ../../using/windows.rst:1008 +#: ../../using/windows.rst:1024 msgid "" "If an environment variable :envvar:`PYLAUNCHER_ALLOW_INSTALL` is set (to any " "value), and the requested Python version is not installed but is available " @@ -1615,7 +1628,7 @@ msgid "" "again." msgstr "" -#: ../../using/windows.rst:1013 +#: ../../using/windows.rst:1029 msgid "" "An additional :envvar:`PYLAUNCHER_ALWAYS_INSTALL` variable causes the " "launcher to always try to install Python, even if it is detected. This is " @@ -1623,137 +1636,137 @@ msgid "" "`PYLAUNCHER_DRYRUN`)." msgstr "" -#: ../../using/windows.rst:1018 +#: ../../using/windows.rst:1034 msgid "Return codes" msgstr "" -#: ../../using/windows.rst:1020 +#: ../../using/windows.rst:1036 msgid "" "The following exit codes may be returned by the Python launcher. " "Unfortunately, there is no way to distinguish these from the exit code of " "Python itself." msgstr "" -#: ../../using/windows.rst:1023 +#: ../../using/windows.rst:1039 msgid "" "The names of codes are as used in the sources, and are only for reference. " "There is no way to access or resolve them apart from reading this page. " "Entries are listed in alphabetical order of names." msgstr "" -#: ../../using/windows.rst:1028 +#: ../../using/windows.rst:1044 msgid "Value" msgstr "" -#: ../../using/windows.rst:1030 +#: ../../using/windows.rst:1046 msgid "RC_BAD_VENV_CFG" msgstr "RC_BAD_VENV_CFG" -#: ../../using/windows.rst:1030 +#: ../../using/windows.rst:1046 msgid "107" msgstr "107" -#: ../../using/windows.rst:1030 +#: ../../using/windows.rst:1046 msgid "A :file:`pyvenv.cfg` was found but is corrupt." msgstr "" -#: ../../using/windows.rst:1032 +#: ../../using/windows.rst:1048 msgid "RC_CREATE_PROCESS" msgstr "RC_CREATE_PROCESS" -#: ../../using/windows.rst:1032 +#: ../../using/windows.rst:1048 msgid "101" msgstr "101" -#: ../../using/windows.rst:1032 +#: ../../using/windows.rst:1048 msgid "Failed to launch Python." msgstr "" -#: ../../using/windows.rst:1034 +#: ../../using/windows.rst:1050 msgid "RC_INSTALLING" msgstr "RC_INSTALLING" -#: ../../using/windows.rst:1034 +#: ../../using/windows.rst:1050 msgid "111" msgstr "111" -#: ../../using/windows.rst:1034 +#: ../../using/windows.rst:1050 msgid "" "An install was started, but the command will need to be re-run after it " "completes." msgstr "" -#: ../../using/windows.rst:1037 +#: ../../using/windows.rst:1053 msgid "RC_INTERNAL_ERROR" msgstr "RC_INTERNAL_ERROR" -#: ../../using/windows.rst:1037 +#: ../../using/windows.rst:1053 msgid "109" msgstr "109" -#: ../../using/windows.rst:1037 +#: ../../using/windows.rst:1053 msgid "Unexpected error. Please report a bug." msgstr "" -#: ../../using/windows.rst:1039 +#: ../../using/windows.rst:1055 msgid "RC_NO_COMMANDLINE" msgstr "RC_NO_COMMANDLINE" -#: ../../using/windows.rst:1039 +#: ../../using/windows.rst:1055 msgid "108" msgstr "108" -#: ../../using/windows.rst:1039 +#: ../../using/windows.rst:1055 msgid "Unable to obtain command line from the operating system." msgstr "" -#: ../../using/windows.rst:1042 +#: ../../using/windows.rst:1058 msgid "RC_NO_PYTHON" msgstr "RC_NO_PYTHON" -#: ../../using/windows.rst:1042 +#: ../../using/windows.rst:1058 msgid "103" msgstr "103" -#: ../../using/windows.rst:1042 +#: ../../using/windows.rst:1058 msgid "Unable to locate the requested version." msgstr "" -#: ../../using/windows.rst:1044 +#: ../../using/windows.rst:1060 msgid "RC_NO_VENV_CFG" msgstr "RC_NO_VENV_CFG" -#: ../../using/windows.rst:1044 +#: ../../using/windows.rst:1060 msgid "106" msgstr "106" -#: ../../using/windows.rst:1044 +#: ../../using/windows.rst:1060 msgid "A :file:`pyvenv.cfg` was required but not found." msgstr "" -#: ../../using/windows.rst:1052 +#: ../../using/windows.rst:1068 msgid "Finding modules" msgstr "" -#: ../../using/windows.rst:1054 +#: ../../using/windows.rst:1070 msgid "" "These notes supplement the description at :ref:`sys-path-init` with detailed " "Windows notes." msgstr "" -#: ../../using/windows.rst:1057 +#: ../../using/windows.rst:1073 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:1060 +#: ../../using/windows.rst:1076 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:1063 +#: ../../using/windows.rst:1079 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1761,7 +1774,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:1068 +#: ../../using/windows.rst:1084 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1771,7 +1784,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:1075 +#: ../../using/windows.rst:1091 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1782,31 +1795,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:1083 +#: ../../using/windows.rst:1099 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:1087 +#: ../../using/windows.rst:1103 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:1090 +#: ../../using/windows.rst:1106 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1094 +#: ../../using/windows.rst:1110 msgid "The end result of all this is:" msgstr "最終這所有的結果為:" -#: ../../using/windows.rst:1096 +#: ../../using/windows.rst:1112 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1814,7 +1827,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1101 +#: ../../using/windows.rst:1117 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1822,20 +1835,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1105 +#: ../../using/windows.rst:1121 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1109 +#: ../../using/windows.rst:1125 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1112 +#: ../../using/windows.rst:1128 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1843,20 +1856,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1117 +#: ../../using/windows.rst:1133 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly call :c:func:`Py_SetPath` or (at least) :c:func:" "`Py_SetProgramName` before :c:func:`Py_Initialize`." msgstr "" -#: ../../using/windows.rst:1121 +#: ../../using/windows.rst:1137 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1124 +#: ../../using/windows.rst:1140 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1865,7 +1878,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1130 +#: ../../using/windows.rst:1146 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1875,19 +1888,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1139 +#: ../../using/windows.rst:1155 msgid "" "Adds ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1141 +#: ../../using/windows.rst:1157 msgid "" "Adds ``pythonXX.zip`` as a potential landmark when directly adjacent to the " "executable." msgstr "" -#: ../../using/windows.rst:1147 +#: ../../using/windows.rst:1163 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -1895,88 +1908,88 @@ msgid "" "explicitly added to :attr:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1153 +#: ../../using/windows.rst:1169 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1155 +#: ../../using/windows.rst:1171 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1159 +#: ../../using/windows.rst:1175 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1163 +#: ../../using/windows.rst:1179 msgid "PyWin32" msgstr "PyWin32" -#: ../../using/windows.rst:1165 +#: ../../using/windows.rst:1181 msgid "" "The `PyWin32 <https://pypi.org/project/pywin32>`_ module by Mark Hammond is " "a collection of modules for advanced Windows-specific support. This " "includes utilities for:" msgstr "" -#: ../../using/windows.rst:1169 +#: ../../using/windows.rst:1185 msgid "" "`Component Object Model <https://docs.microsoft.com/en-us/windows/win32/com/" "component-object-model--com--portal>`_ (COM)" msgstr "" -#: ../../using/windows.rst:1172 +#: ../../using/windows.rst:1188 msgid "Win32 API calls" msgstr "Win32 API 呼叫" -#: ../../using/windows.rst:1173 +#: ../../using/windows.rst:1189 msgid "Registry" msgstr "登錄檔(Registry)" -#: ../../using/windows.rst:1174 +#: ../../using/windows.rst:1190 msgid "Event log" msgstr "事件日誌(Event log)" -#: ../../using/windows.rst:1175 +#: ../../using/windows.rst:1191 msgid "" "`Microsoft Foundation Classes <https://docs.microsoft.com/en-us/cpp/mfc/mfc-" "desktop-applications>`_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1179 +#: ../../using/windows.rst:1195 msgid "" "`PythonWin <https://web.archive.org/web/20060524042422/ https://www.python." "org/windows/pythonwin/>`_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1186 +#: ../../using/windows.rst:1202 msgid "" "`Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_" msgstr "" "`Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_" -#: ../../using/windows.rst:1186 +#: ../../using/windows.rst:1202 msgid "by Tim Golden" msgstr "由 Tim Golden 所著" -#: ../../using/windows.rst:1188 +#: ../../using/windows.rst:1204 msgid "`Python and COM <https://www.boddie.org.uk/python/COM.html>`_" msgstr "`Python and COM <https://www.boddie.org.uk/python/COM.html>`_" -#: ../../using/windows.rst:1189 +#: ../../using/windows.rst:1205 msgid "by David and Paul Boddie" msgstr "由 David 與 Paul Boddie 所著" -#: ../../using/windows.rst:1193 +#: ../../using/windows.rst:1209 msgid "cx_Freeze" msgstr "cx_Freeze" -#: ../../using/windows.rst:1195 +#: ../../using/windows.rst:1211 msgid "" "`cx_Freeze <https://cx-freeze.readthedocs.io/en/latest/>`_ is a :mod:" "`distutils` extension (see :ref:`extending-distutils`) which wraps Python " @@ -1985,11 +1998,11 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1203 +#: ../../using/windows.rst:1219 msgid "Compiling Python on Windows" msgstr "編譯 Python 在 Windows" -#: ../../using/windows.rst:1205 +#: ../../using/windows.rst:1221 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source <https://www.python.org/downloads/source/>`_. You can download " @@ -1997,48 +2010,48 @@ msgid "" "devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1210 +#: ../../using/windows.rst:1226 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1214 +#: ../../using/windows.rst:1230 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1216 +#: ../../using/windows.rst:1232 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1220 +#: ../../using/windows.rst:1236 msgid "Other Platforms" msgstr "其他平台" -#: ../../using/windows.rst:1222 +#: ../../using/windows.rst:1238 msgid "" "With ongoing development of Python, some platforms that used to be supported " "earlier are no longer supported (due to the lack of users or developers). " "Check :pep:`11` for details on all unsupported platforms." msgstr "" -#: ../../using/windows.rst:1226 +#: ../../using/windows.rst:1242 msgid "" "`Windows CE <https://pythonce.sourceforge.net/>`_ is `no longer supported " "<https://github.com/python/cpython/issues/71542>`__ since Python 3 (if it " "ever was)." msgstr "" -#: ../../using/windows.rst:1229 +#: ../../using/windows.rst:1245 msgid "" "The `Cygwin <https://cygwin.com/>`_ installer offers to install the `Python " "interpreter <https://cygwin.com/packages/summary/python3.html>`__ as well" msgstr "" -#: ../../using/windows.rst:1233 +#: ../../using/windows.rst:1249 msgid "" "See `Python for Windows <https://www.python.org/downloads/windows/>`_ for " "detailed information about platforms with pre-compiled installers."