Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitded7fe0

Browse files
sync with cpython 428bd028
1 parent76b4ac8 commitded7fe0

File tree

4 files changed

+99
-84
lines changed

4 files changed

+99
-84
lines changed

‎library/copyreg.po

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.10\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2022-01-19 00:09+0000\n"
10+
"POT-Creation-Date:2022-10-11 00:23+0000\n"
1111
"PO-Revision-Date:2016-11-19 00:29+0000\n"
1212
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -45,30 +45,28 @@ msgstr ""
4545
msgid""
4646
"Declares that *function* should be used as a\"reduction\" function for "
4747
"objects of type *type*. *function* should return either a string or a tuple "
48-
"containing two or three elements."
48+
"containing two or three elements. See the :attr:`~pickle.Pickler."
49+
"dispatch_table` for more details on the interface of *function*."
4950
msgstr""
5051

51-
#:../../library/copyreg.rst:34
52+
#:../../library/copyreg.rst:35
5253
msgid""
53-
"The optional *constructor* parameter, if provided, is a callable object "
54-
"which can be used to reconstruct the object when called with the tuple of "
55-
"arguments returned by *function* at pickling time. A :exc:`TypeError` is "
56-
"raised if the *constructor* is not callable."
54+
"The *constructor_ob* parameter is a legacy feature and is now ignored, but "
55+
"if passed it must be a callable."
5756
msgstr""
5857

59-
#:../../library/copyreg.rst:39
58+
#:../../library/copyreg.rst:38
6059
msgid""
61-
"See the :mod:`pickle` module for more details on the interface expected of "
62-
"*function* and *constructor*. Note that the :attr:`~pickle.Pickler."
63-
"dispatch_table` attribute of a pickler object or subclass of :class:`pickle."
64-
"Pickler` can also be used for declaring reduction functions."
60+
"Note that the :attr:`~pickle.Pickler.dispatch_table` attribute of a pickler "
61+
"object or subclass of :class:`pickle.Pickler` can also be used for declaring "
62+
"reduction functions."
6563
msgstr""
6664

67-
#:../../library/copyreg.rst:46
65+
#:../../library/copyreg.rst:43
6866
msgid"Example"
6967
msgstr"範例"
7068

71-
#:../../library/copyreg.rst:48
69+
#:../../library/copyreg.rst:45
7270
msgid""
7371
"The example below would like to show how to register a pickle function and "
7472
"how it will be used:"

‎library/os.po

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.10\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2022-10-09 00:22+0000\n"
10+
"POT-Creation-Date:2022-10-11 00:23+0000\n"
1111
"PO-Revision-Date:2018-05-23 16:07+0000\n"
1212
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -447,11 +447,11 @@ msgstr ""
447447

448448
#:../../library/os.rst:294
449449
msgid""
450-
"Return the value of the environment variable *key* if it exists, or "
451-
"*default* if it doesn't. *key*, *default* and the result are str. Note that "
452-
"since :func:`getenv` uses :data:`os.environ`, the mapping of :func:`getenv` "
453-
"is similarlyalso captured on import, and the function may not reflect "
454-
"future environmentchanges."
450+
"Return the value of the environment variable *key*as a stringif it exists, "
451+
"or*default* if it doesn't. *key* is a string. Note thatsince :func:"
452+
"`getenv` uses :data:`os.environ`, the mapping of :func:`getenv` is similarly "
453+
"also captured on import, and the function may not reflect future environment "
454+
"changes."
455455
msgstr""
456456

457457
#:../../library/os.rst:300
@@ -467,11 +467,11 @@ msgstr ":ref:`適用 <availability>`:大部分的 Unix、Windows。"
467467

468468
#:../../library/os.rst:309
469469
msgid""
470-
"Return the value of the environment variable *key* if it exists, or "
471-
"*default* if it doesn't. *key*, *default* and the result arebytes. Note "
472-
"that since :func:`getenvb` uses :data:`os.environb`, the mapping of :func:"
473-
"`getenvb` issimilarly also captured on import, and the function may not "
474-
"reflect futureenvironment changes."
470+
"Return the value of the environment variable *key*as bytesif it exists, or "
471+
"*default* if it doesn't. *key* must bebytes. Notethat since :func:"
472+
"`getenvb` uses :data:`os.environb`, the mapping of :func:`getenvb` is"
473+
"similarly also captured on import, and the function may not reflect future "
474+
"environment changes."
475475
msgstr""
476476

477477
#:../../library/os.rst:316

‎library/venv.po

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.10\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2022-06-22 00:18+0000\n"
10+
"POT-Creation-Date:2022-10-11 00:23+0000\n"
1111
"PO-Revision-Date:2018-05-23 16:15+0000\n"
1212
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -333,113 +333,129 @@ msgid ""
333333
"environment in ``PATH``."
334334
msgstr""
335335

336-
#:../../library/venv.rst:91
336+
#:../../library/venv.rst:87
337+
msgid""
338+
"Because scripts installed in environments should not expect the environment "
339+
"to be activated, their shebang lines contain the absolute paths to their "
340+
"environment's interpreters. Because of this, environments are inherently non-"
341+
"portable, in the general case. You should always have a simple means of "
342+
"recreating an environment (for example, if you have a requirements file "
343+
"``requirements.txt``, you can invoke ``pip install -r requirements.txt`` "
344+
"using the environment's ``pip`` to install all of the packages needed by the "
345+
"environment). If for any reason you need to move the environment to a new "
346+
"location, you should recreate it at the desired location and delete the one "
347+
"at the old location. If you move an environment because you moved a parent "
348+
"directory of it, you should recreate the environment in its new location. "
349+
"Otherwise, software installed into the environment may not work as expected."
350+
msgstr""
351+
352+
#:../../library/venv.rst:104
337353
msgid"API"
338354
msgstr"API"
339355

340-
#:../../library/venv.rst:95
356+
#:../../library/venv.rst:108
341357
msgid""
342358
"The high-level method described above makes use of a simple API which "
343359
"provides mechanisms for third-party virtual environment creators to "
344360
"customize environment creation according to their needs, the :class:"
345361
"`EnvBuilder` class."
346362
msgstr""
347363

348-
#:../../library/venv.rst:103
364+
#:../../library/venv.rst:116
349365
msgid""
350366
"The :class:`EnvBuilder` class accepts the following keyword arguments on "
351367
"instantiation:"
352368
msgstr""
353369

354-
#:../../library/venv.rst:106
370+
#:../../library/venv.rst:119
355371
msgid""
356372
"``system_site_packages`` -- a Boolean value indicating that the system "
357373
"Python site-packages should be available to the environment (defaults to "
358374
"``False``)."
359375
msgstr""
360376

361-
#:../../library/venv.rst:109
377+
#:../../library/venv.rst:122
362378
msgid""
363379
"``clear`` -- a Boolean value which, if true, will delete the contents of any "
364380
"existing target directory, before creating the environment."
365381
msgstr""
366382

367-
#:../../library/venv.rst:112
383+
#:../../library/venv.rst:125
368384
msgid""
369385
"``symlinks`` -- a Boolean value indicating whether to attempt to symlink the "
370386
"Python binary rather than copying."
371387
msgstr""
372388

373-
#:../../library/venv.rst:115
389+
#:../../library/venv.rst:128
374390
msgid""
375391
"``upgrade`` -- a Boolean value which, if true, will upgrade an existing "
376392
"environment with the running Python - for use when that Python has been "
377393
"upgraded in-place (defaults to ``False``)."
378394
msgstr""
379395

380-
#:../../library/venv.rst:119
396+
#:../../library/venv.rst:132
381397
msgid""
382398
"``with_pip`` -- a Boolean value which, if true, ensures pip is installed in "
383399
"the virtual environment. This uses :mod:`ensurepip` with the ``--default-"
384400
"pip`` option."
385401
msgstr""
386402

387-
#:../../library/venv.rst:123
403+
#:../../library/venv.rst:136
388404
msgid""
389405
"``prompt`` -- a String to be used after virtual environment is activated "
390406
"(defaults to ``None`` which means directory name of the environment would be "
391407
"used). If the special string ``\".\"`` is provided, the basename of the "
392408
"current directory is used as the prompt."
393409
msgstr""
394410

395-
#:../../library/venv.rst:128
411+
#:../../library/venv.rst:141
396412
msgid"``upgrade_deps`` -- Update the base venv modules to the latest on PyPI"
397413
msgstr""
398414

399-
#:../../library/venv.rst:130../../library/venv.rst:260
415+
#:../../library/venv.rst:143../../library/venv.rst:273
400416
msgid"Added the ``with_pip`` parameter"
401417
msgstr"新增 ``with_pip`` 參數"
402418

403-
#:../../library/venv.rst:133../../library/venv.rst:263
419+
#:../../library/venv.rst:146../../library/venv.rst:276
404420
msgid"Added the ``prompt`` parameter"
405421
msgstr"新增 ``prompt`` 參數"
406422

407-
#:../../library/venv.rst:136../../library/venv.rst:266
423+
#:../../library/venv.rst:149../../library/venv.rst:279
408424
msgid"Added the ``upgrade_deps`` parameter"
409425
msgstr"新增 ``upgrade_deps`` 參數"
410426

411-
#:../../library/venv.rst:139
427+
#:../../library/venv.rst:152
412428
msgid""
413429
"Creators of third-party virtual environment tools will be free to use the "
414430
"provided :class:`EnvBuilder` class as a base class."
415431
msgstr""
416432

417-
#:../../library/venv.rst:142
433+
#:../../library/venv.rst:155
418434
msgid"The returned env-builder is an object which has a method, ``create``:"
419435
msgstr""
420436

421-
#:../../library/venv.rst:146
437+
#:../../library/venv.rst:159
422438
msgid""
423439
"Create a virtual environment by specifying the target directory (absolute or "
424440
"relative to the current directory) which is to contain the virtual "
425441
"environment. The ``create`` method will either create the environment in "
426442
"the specified directory, or raise an appropriate exception."
427443
msgstr""
428444

429-
#:../../library/venv.rst:152
445+
#:../../library/venv.rst:165
430446
msgid""
431447
"The ``create`` method of the :class:`EnvBuilder` class illustrates the hooks "
432448
"available for subclass customization::"
433449
msgstr""
434450

435-
#:../../library/venv.rst:167
451+
#:../../library/venv.rst:180
436452
msgid""
437453
"Each of the methods :meth:`ensure_directories`, :meth:"
438454
"`create_configuration`, :meth:`setup_python`, :meth:`setup_scripts` and :"
439455
"meth:`post_setup` can be overridden."
440456
msgstr""
441457

442-
#:../../library/venv.rst:173
458+
#:../../library/venv.rst:186
443459
msgid""
444460
"Creates the environment directory and all necessary directories, and returns "
445461
"a context object. This is just a holder for attributes (such as paths), for "
@@ -448,60 +464,60 @@ msgid ""
448464
"an existing environment directory."
449465
msgstr""
450466

451-
#:../../library/venv.rst:181
467+
#:../../library/venv.rst:194
452468
msgid"Creates the ``pyvenv.cfg`` configuration file in the environment."
453469
msgstr""
454470

455-
#:../../library/venv.rst:185
471+
#:../../library/venv.rst:198
456472
msgid""
457473
"Creates a copy or symlink to the Python executable in the environment. On "
458474
"POSIX systems, if a specific executable ``python3.x`` was used, symlinks to "
459475
"``python`` and ``python3`` will be created pointing to that executable, "
460476
"unless files with those names already exist."
461477
msgstr""
462478

463-
#:../../library/venv.rst:192
479+
#:../../library/venv.rst:205
464480
msgid""
465481
"Installs activation scripts appropriate to the platform into the virtual "
466482
"environment."
467483
msgstr""
468484

469-
#:../../library/venv.rst:197
485+
#:../../library/venv.rst:210
470486
msgid""
471487
"Upgrades the core venv dependency packages (currently ``pip`` and "
472488
"``setuptools``) in the environment. This is done by shelling out to the "
473489
"``pip`` executable in the environment."
474490
msgstr""
475491

476-
#:../../library/venv.rst:205
492+
#:../../library/venv.rst:218
477493
msgid""
478494
"A placeholder method which can be overridden in third party implementations "
479495
"to pre-install packages in the virtual environment or perform other post-"
480496
"creation steps."
481497
msgstr""
482498

483-
#:../../library/venv.rst:209
499+
#:../../library/venv.rst:222
484500
msgid""
485501
"Windows now uses redirector scripts for ``python[w].exe`` instead of copying "
486502
"the actual binaries. In 3.7.2 only :meth:`setup_python` does nothing unless "
487503
"running from a build in the source tree."
488504
msgstr""
489505

490-
#:../../library/venv.rst:214
506+
#:../../library/venv.rst:227
491507
msgid""
492508
"Windows copies the redirector scripts as part of :meth:`setup_python` "
493509
"instead of :meth:`setup_scripts`. This was not the case in 3.7.2. When using "
494510
"symlinks, the original executables will be linked."
495511
msgstr""
496512

497-
#:../../library/venv.rst:219
513+
#:../../library/venv.rst:232
498514
msgid""
499515
"In addition, :class:`EnvBuilder` provides this utility method that can be "
500516
"called from :meth:`setup_scripts` or :meth:`post_setup` in subclasses to "
501517
"assist in installing custom scripts into the virtual environment."
502518
msgstr""
503519

504-
#:../../library/venv.rst:225
520+
#:../../library/venv.rst:238
505521
msgid""
506522
"*path* is the path to a directory that should contain subdirectories\"common"
507523
"\",\"posix\",\"nt\", each containing scripts destined for the bin "
@@ -510,64 +526,64 @@ msgid ""
510526
"placeholders:"
511527
msgstr""
512528

513-
#:../../library/venv.rst:231
529+
#:../../library/venv.rst:244
514530
msgid""
515531
"``__VENV_DIR__`` is replaced with the absolute path of the environment "
516532
"directory."
517533
msgstr""
518534

519-
#:../../library/venv.rst:234
535+
#:../../library/venv.rst:247
520536
msgid""
521537
"``__VENV_NAME__`` is replaced with the environment name (final path segment "
522538
"of environment directory)."
523539
msgstr""
524540

525-
#:../../library/venv.rst:237
541+
#:../../library/venv.rst:250
526542
msgid""
527543
"``__VENV_PROMPT__`` is replaced with the prompt (the environment name "
528544
"surrounded by parentheses and with a following space)"
529545
msgstr""
530546

531-
#:../../library/venv.rst:240
547+
#:../../library/venv.rst:253
532548
msgid""
533549
"``__VENV_BIN_NAME__`` is replaced with the name of the bin directory (either "
534550
"``bin`` or ``Scripts``)."
535551
msgstr""
536552

537-
#:../../library/venv.rst:243
553+
#:../../library/venv.rst:256
538554
msgid""
539555
"``__VENV_PYTHON__`` is replaced with the absolute path of the environment's "
540556
"executable."
541557
msgstr""
542558

543-
#:../../library/venv.rst:246
559+
#:../../library/venv.rst:259
544560
msgid""
545561
"The directories are allowed to exist (for when an existing environment is "
546562
"being upgraded)."
547563
msgstr""
548564

549-
#:../../library/venv.rst:249
565+
#:../../library/venv.rst:262
550566
msgid"There is also a module-level convenience function:"
551567
msgstr""
552568

553-
#:../../library/venv.rst:255
569+
#:../../library/venv.rst:268
554570
msgid""
555571
"Create an :class:`EnvBuilder` with the given keyword arguments, and call "
556572
"its :meth:`~EnvBuilder.create` method with the *env_dir* argument."
557573
msgstr""
558574

559-
#:../../library/venv.rst:270
575+
#:../../library/venv.rst:283
560576
msgid"An example of extending ``EnvBuilder``"
561577
msgstr""
562578

563-
#:../../library/venv.rst:272
579+
#:../../library/venv.rst:285
564580
msgid""
565581
"The following script shows how to extend :class:`EnvBuilder` by implementing "
566582
"a subclass which installs setuptools and pip into a created virtual "
567583
"environment::"
568584
msgstr""
569585

570-
#:../../library/venv.rst:491
586+
#:../../library/venv.rst:504
571587
msgid""
572588
"This script is also available for download `online <https://gist.github.com/"
573589
"vsajip/4673395>`_."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp