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

Commit30f395c

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.10 (#280)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>Co-authored-by: Matt.Wang <mattwang44@gmail.com>
1 parent67b48d2 commit30f395c

35 files changed

+1982
-1919
lines changed

‎c-api/call.po

Lines changed: 70 additions & 76 deletions
Large diffs are not rendered by default.

‎c-api/init_config.po

Lines changed: 235 additions & 235 deletions
Large diffs are not rendered by default.

‎c-api/structures.po

Lines changed: 91 additions & 95 deletions
Large diffs are not rendered by default.

‎c-api/typeobj.po

Lines changed: 352 additions & 359 deletions
Large diffs are not rendered by default.

‎faq/design.po

Lines changed: 83 additions & 86 deletions
Large diffs are not rendered by default.

‎faq/library.po

Lines changed: 67 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version:Python 3.10\n"
1111
"Report-Msgid-Bugs-To:\n"
12-
"POT-Creation-Date:2022-05-21 17:35+0000\n"
12+
"POT-Creation-Date:2022-06-10 00:16+0000\n"
1313
"PO-Revision-Date:2018-05-23 14:35+0000\n"
1414
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1515
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -519,53 +519,58 @@ msgstr ""
519519

520520
#:../../faq/library.rst:486
521521
msgid""
522-
"The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note "
523-
"that on MacOS 9 it doesn't copy the resource fork and Finder info."
522+
"The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note "
523+
"that on Windows NTFS volumes, it does not copy `alternate data streams "
524+
"<https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)>`_ nor "
525+
"`resource forks <https://en.wikipedia.org/wiki/Resource_fork>`__ on macOS HFS"
526+
"+ volumes, though both are now rarely used. It also doesn't copy file "
527+
"permissions and metadata, though using :func:`shutil.copy2` instead will "
528+
"preserve most (though not all) of it."
524529
msgstr""
525530

526-
#:../../faq/library.rst:491
531+
#:../../faq/library.rst:497
527532
msgid"How do I read (or write) binary data?"
528533
msgstr""
529534

530-
#:../../faq/library.rst:493
535+
#:../../faq/library.rst:499
531536
msgid""
532537
"To read or write complex binary data formats, it's best to use the :mod:"
533538
"`struct` module. It allows you to take a string containing binary data "
534539
"(usually numbers) and convert it to Python objects; and vice versa."
535540
msgstr""
536541

537-
#:../../faq/library.rst:497
542+
#:../../faq/library.rst:503
538543
msgid""
539544
"For example, the following code reads two 2-byte integers and one 4-byte "
540545
"integer in big-endian format from a file::"
541546
msgstr""
542547

543-
#:../../faq/library.rst:506
548+
#:../../faq/library.rst:512
544549
msgid""
545550
"The '>' in the format string forces big-endian data; the letter 'h' reads "
546551
"one\"short integer\" (2 bytes), and 'l' reads one\"long integer\" (4 "
547552
"bytes) from the string."
548553
msgstr""
549554

550-
#:../../faq/library.rst:510
555+
#:../../faq/library.rst:516
551556
msgid""
552557
"For data that is more regular (e.g. a homogeneous list of ints or floats), "
553558
"you can also use the :mod:`array` module."
554559
msgstr""
555560

556-
#:../../faq/library.rst:515
561+
#:../../faq/library.rst:521
557562
msgid""
558563
"To read and write binary data, it is mandatory to open the file in binary "
559564
"mode (here, passing ``\"rb\"`` to :func:`open`). If you use ``\"r\"`` "
560565
"instead (the default), the file will be open in text mode and ``f.read()`` "
561566
"will return :class:`str` objects rather than :class:`bytes` objects."
562567
msgstr""
563568

564-
#:../../faq/library.rst:523
569+
#:../../faq/library.rst:529
565570
msgid"I can't seem to use os.read() on a pipe created with os.popen(); why?"
566571
msgstr""
567572

568-
#:../../faq/library.rst:525
573+
#:../../faq/library.rst:531
569574
msgid""
570575
":func:`os.read` is a low-level function which takes a file descriptor, a "
571576
"small integer representing the opened file. :func:`os.popen` creates a high-"
@@ -574,37 +579,37 @@ msgid ""
574579
"popen`, you need to use ``p.read(n)``."
575580
msgstr""
576581

577-
#:../../faq/library.rst:612
582+
#:../../faq/library.rst:618
578583
msgid"How do I access the serial (RS232) port?"
579584
msgstr""
580585

581-
#:../../faq/library.rst:614
586+
#:../../faq/library.rst:620
582587
msgid"For Win32, OSX, Linux, BSD, Jython, IronPython:"
583588
msgstr""
584589

585-
#:../../faq/library.rst:616
590+
#:../../faq/library.rst:622
586591
msgid"https://pypi.org/project/pyserial/"
587592
msgstr"https://pypi.org/project/pyserial/"
588593

589-
#:../../faq/library.rst:618
594+
#:../../faq/library.rst:624
590595
msgid"For Unix, see a Usenet post by Mitch Chapman:"
591596
msgstr""
592597

593-
#:../../faq/library.rst:620
598+
#:../../faq/library.rst:626
594599
msgid"https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com"
595600
msgstr"https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com"
596601

597-
#:../../faq/library.rst:624
602+
#:../../faq/library.rst:630
598603
msgid"Why doesn't closing sys.stdout (stdin, stderr) really close it?"
599604
msgstr""
600605

601-
#:../../faq/library.rst:626
606+
#:../../faq/library.rst:632
602607
msgid""
603608
"Python :term:`file objects <file object>` are a high-level layer of "
604609
"abstraction on low-level C file descriptors."
605610
msgstr""
606611

607-
#:../../faq/library.rst:629
612+
#:../../faq/library.rst:635
608613
msgid""
609614
"For most file objects you create in Python via the built-in :func:`open` "
610615
"function, ``f.close()`` marks the Python file object as being closed from "
@@ -613,120 +618,120 @@ msgid ""
613618
"``f`` becomes garbage."
614619
msgstr""
615620

616-
#:../../faq/library.rst:635
621+
#:../../faq/library.rst:641
617622
msgid""
618623
"But stdin, stdout and stderr are treated specially by Python, because of the "
619624
"special status also given to them by C. Running ``sys.stdout.close()`` "
620625
"marks the Python-level file object as being closed, but does *not* close the "
621626
"associated C file descriptor."
622627
msgstr""
623628

624-
#:../../faq/library.rst:640
629+
#:../../faq/library.rst:646
625630
msgid""
626631
"To close the underlying C file descriptor for one of these three, you should "
627632
"first be sure that's what you really want to do (e.g., you may confuse "
628633
"extension modules trying to do I/O). If it is, use :func:`os.close`::"
629634
msgstr""
630635

631-
#:../../faq/library.rst:648
636+
#:../../faq/library.rst:654
632637
msgid"Or you can use the numeric constants 0, 1 and 2, respectively."
633638
msgstr""
634639

635-
#:../../faq/library.rst:652
640+
#:../../faq/library.rst:658
636641
msgid"Network/Internet Programming"
637642
msgstr""
638643

639-
#:../../faq/library.rst:655
644+
#:../../faq/library.rst:661
640645
msgid"What WWW tools are there for Python?"
641646
msgstr""
642647

643-
#:../../faq/library.rst:657
648+
#:../../faq/library.rst:663
644649
msgid""
645650
"See the chapters titled :ref:`internet` and :ref:`netdata` in the Library "
646651
"Reference Manual. Python has many modules that will help you build server-"
647652
"side and client-side web systems."
648653
msgstr""
649654

650-
#:../../faq/library.rst:663
655+
#:../../faq/library.rst:669
651656
msgid""
652657
"A summary of available frameworks is maintained by Paul Boddie at https://"
653658
"wiki.python.org/moin/WebProgramming\\ ."
654659
msgstr""
655660

656-
#:../../faq/library.rst:666
661+
#:../../faq/library.rst:672
657662
msgid""
658663
"Cameron Laird maintains a useful set of pages about Python web technologies "
659664
"at http://phaseit.net/claird/comp.lang.python/web_python."
660665
msgstr""
661666

662-
#:../../faq/library.rst:671
667+
#:../../faq/library.rst:677
663668
msgid"How can I mimic CGI form submission (METHOD=POST)?"
664669
msgstr""
665670

666-
#:../../faq/library.rst:673
671+
#:../../faq/library.rst:679
667672
msgid""
668673
"I would like to retrieve web pages that are the result of POSTing a form. Is "
669674
"there existing code that would let me do this easily?"
670675
msgstr""
671676

672-
#:../../faq/library.rst:676
677+
#:../../faq/library.rst:682
673678
msgid"Yes. Here's a simple example that uses :mod:`urllib.request`::"
674679
msgstr""
675680

676-
#:../../faq/library.rst:691
681+
#:../../faq/library.rst:697
677682
msgid""
678683
"Note that in general for percent-encoded POST operations, query strings must "
679684
"be quoted using :func:`urllib.parse.urlencode`. For example, to send "
680685
"``name=Guy Steele, Jr.``::"
681686
msgstr""
682687

683-
#:../../faq/library.rst:699
688+
#:../../faq/library.rst:705
684689
msgid":ref:`urllib-howto` for extensive examples."
685690
msgstr""
686691

687-
#:../../faq/library.rst:703
692+
#:../../faq/library.rst:709
688693
msgid"What module should I use to help with generating HTML?"
689694
msgstr""
690695

691-
#:../../faq/library.rst:707
696+
#:../../faq/library.rst:713
692697
msgid""
693698
"You can find a collection of useful links on the `Web Programming wiki page "
694699
"<https://wiki.python.org/moin/WebProgramming>`_."
695700
msgstr""
696701

697-
#:../../faq/library.rst:712
702+
#:../../faq/library.rst:718
698703
msgid"How do I send mail from a Python script?"
699704
msgstr""
700705

701-
#:../../faq/library.rst:714
706+
#:../../faq/library.rst:720
702707
msgid"Use the standard library module :mod:`smtplib`."
703708
msgstr""
704709

705-
#:../../faq/library.rst:716
710+
#:../../faq/library.rst:722
706711
msgid""
707712
"Here's a very simple interactive mail sender that uses it. This method will "
708713
"work on any host that supports an SMTP listener. ::"
709714
msgstr""
710715

711-
#:../../faq/library.rst:736
716+
#:../../faq/library.rst:742
712717
msgid""
713718
"A Unix-only alternative uses sendmail. The location of the sendmail program "
714719
"varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes ``/"
715720
"usr/sbin/sendmail``. The sendmail manual page will help you out. Here's "
716721
"some sample code::"
717722
msgstr""
718723

719-
#:../../faq/library.rst:756
724+
#:../../faq/library.rst:762
720725
msgid"How do I avoid blocking in the connect() method of a socket?"
721726
msgstr""
722727

723-
#:../../faq/library.rst:758
728+
#:../../faq/library.rst:764
724729
msgid""
725730
"The :mod:`select` module is commonly used to help with asynchronous I/O on "
726731
"sockets."
727732
msgstr""
728733

729-
#:../../faq/library.rst:761
734+
#:../../faq/library.rst:767
730735
msgid""
731736
"To prevent the TCP connect from blocking, you can set the socket to non-"
732737
"blocking mode. Then when you do the :meth:`socket.connect`, you will either "
@@ -736,7 +741,7 @@ msgid ""
736741
"values, so you're going to have to check what's returned on your system."
737742
msgstr""
738743

739-
#:../../faq/library.rst:768
744+
#:../../faq/library.rst:774
740745
msgid""
741746
"You can use the :meth:`socket.connect_ex` method to avoid creating an "
742747
"exception. It will just return the errno value. To poll, you can call :"
@@ -745,102 +750,102 @@ msgid ""
745750
"select` to check if it's writable."
746751
msgstr""
747752

748-
#:../../faq/library.rst:774
753+
#:../../faq/library.rst:780
749754
msgid""
750755
"The :mod:`asyncio` module provides a general purpose single-threaded and "
751756
"concurrent asynchronous library, which can be used for writing non-blocking "
752757
"network code. The third-party `Twisted <https://twistedmatrix.com/trac/>`_ "
753758
"library is a popular and feature-rich alternative."
754759
msgstr""
755760

756-
#:../../faq/library.rst:782
761+
#:../../faq/library.rst:788
757762
msgid"Databases"
758763
msgstr""
759764

760-
#:../../faq/library.rst:785
765+
#:../../faq/library.rst:791
761766
msgid"Are there any interfaces to database packages in Python?"
762767
msgstr""
763768

764-
#:../../faq/library.rst:787
769+
#:../../faq/library.rst:793
765770
msgid"Yes."
766771
msgstr"有的"
767772

768-
#:../../faq/library.rst:789
773+
#:../../faq/library.rst:795
769774
msgid""
770775
"Interfaces to disk-based hashes such as :mod:`DBM <dbm.ndbm>` and :mod:`GDBM "
771776
"<dbm.gnu>` are also included with standard Python. There is also the :mod:"
772777
"`sqlite3` module, which provides a lightweight disk-based relational "
773778
"database."
774779
msgstr""
775780

776-
#:../../faq/library.rst:794
781+
#:../../faq/library.rst:800
777782
msgid""
778783
"Support for most relational databases is available. See the "
779784
"`DatabaseProgramming wiki page <https://wiki.python.org/moin/"
780785
"DatabaseProgramming>`_ for details."
781786
msgstr""
782787

783-
#:../../faq/library.rst:800
788+
#:../../faq/library.rst:806
784789
msgid"How do you implement persistent objects in Python?"
785790
msgstr""
786791

787-
#:../../faq/library.rst:802
792+
#:../../faq/library.rst:808
788793
msgid""
789794
"The :mod:`pickle` library module solves this in a very general way (though "
790795
"you still can't store things like open files, sockets or windows), and the :"
791796
"mod:`shelve` library module uses pickle and (g)dbm to create persistent "
792797
"mappings containing arbitrary Python objects."
793798
msgstr""
794799

795-
#:../../faq/library.rst:809
800+
#:../../faq/library.rst:815
796801
msgid"Mathematics and Numerics"
797802
msgstr""
798803

799-
#:../../faq/library.rst:812
804+
#:../../faq/library.rst:818
800805
msgid"How do I generate random numbers in Python?"
801806
msgstr""
802807

803-
#:../../faq/library.rst:814
808+
#:../../faq/library.rst:820
804809
msgid""
805810
"The standard module :mod:`random` implements a random number generator. "
806811
"Usage is simple::"
807812
msgstr""
808813

809-
#:../../faq/library.rst:820
814+
#:../../faq/library.rst:826
810815
msgid"This returns a random floating point number in the range [0, 1)."
811816
msgstr""
812817

813-
#:../../faq/library.rst:822
818+
#:../../faq/library.rst:828
814819
msgid""
815820
"There are also many other specialized generators in this module, such as:"
816821
msgstr""
817822

818-
#:../../faq/library.rst:824
823+
#:../../faq/library.rst:830
819824
msgid"``randrange(a, b)`` chooses an integer in the range [a, b)."
820825
msgstr""
821826

822-
#:../../faq/library.rst:825
827+
#:../../faq/library.rst:831
823828
msgid"``uniform(a, b)`` chooses a floating point number in the range [a, b)."
824829
msgstr""
825830

826-
#:../../faq/library.rst:826
831+
#:../../faq/library.rst:832
827832
msgid""
828833
"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution."
829834
msgstr""
830835

831-
#:../../faq/library.rst:828
836+
#:../../faq/library.rst:834
832837
msgid"Some higher-level functions operate on sequences directly, such as:"
833838
msgstr""
834839

835-
#:../../faq/library.rst:830
840+
#:../../faq/library.rst:836
836841
msgid"``choice(S)`` chooses a random element from a given sequence."
837842
msgstr""
838843

839-
#:../../faq/library.rst:831
844+
#:../../faq/library.rst:837
840845
msgid"``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly."
841846
msgstr""
842847

843-
#:../../faq/library.rst:833
848+
#:../../faq/library.rst:839
844849
msgid""
845850
"There's also a ``Random`` class you can instantiate to create independent "
846851
"multiple random number generators."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp