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

Commit91d7386

Browse files
committed
Translate library/random.po part.1
1 parentac15240 commit91d7386

File tree

1 file changed

+44
-9
lines changed

1 file changed

+44
-9
lines changed

‎library/random.po‎

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@
33
# This file is distributed under the same license as the Python package.
44
#
55
# Translators:
6+
# Allen Wu <allen91.wu@gmail.com>, 2021
67
msgid ""
78
msgstr ""
89
"Project-Id-Version:Python 3.10\n"
910
"Report-Msgid-Bugs-To:\n"
1011
"POT-Creation-Date:2021-10-26 16:47+0000\n"
11-
"PO-Revision-Date:2018-05-23 16:09+0000\n"
12-
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
12+
"PO-Revision-Date:2021-12-01 16:59+0800\n"
13+
"Last-Translator:Allen Wu <allen91.wu@gmail.com>\n"
1314
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1415
"tw)\n"
1516
"Language:zh_TW\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"
1920
"Plural-Forms:nplurals=1; plural=0;\n"
21+
"X-Generator:Poedit 3.0\n"
2022

2123
#:../../library/random.rst:2
2224
msgid":mod:`random` --- Generate pseudo-random numbers"
23-
msgstr""
25+
msgstr":mod:`random`---生成虛擬隨機數"
2426

2527
#:../../library/random.rst:7
2628
msgid"**Source code:** :source:`Lib/random.py`"
@@ -30,7 +32,7 @@ msgstr "**原始碼:**\\ :source:`Lib/random.py`"
3032
msgid""
3133
"This module implements pseudo-random number generators for various "
3234
"distributions."
33-
msgstr""
35+
msgstr"本章中所提及的 module(模組)用來實現各種分佈的虛擬隨機數產生器。"
3436

3537
#:../../library/random.rst:14
3638
msgid""
@@ -39,13 +41,17 @@ msgid ""
3941
"permutation of a list in-place, and a function for random sampling without "
4042
"replacement."
4143
msgstr""
44+
"對於整數,可以從範圍中進行統一選擇。對於序列,有一個隨機元素的統一選擇,一個用來產生隨機排列清"
45+
"單的函式,以及一個用來隨機採樣不替換的函式。"
4246

4347
#:../../library/random.rst:19
4448
msgid""
4549
"On the real line, there are functions to compute uniform, normal (Gaussian), "
4650
"lognormal, negative exponential, gamma, and beta distributions. For "
4751
"generating distributions of angles, the von Mises distribution is available."
4852
msgstr""
53+
"在實數線上,有一些函式用於處理均勻分佈、常態分佈(高斯分佈)、對數常態分佈、負指數分佈、gamma "
54+
"分佈和 Beta 分佈。對於生成角度分佈,可以使用 馮·米塞斯分佈 (von Mises distribution)。"
4955

5056
#:../../library/random.rst:23
5157
msgid""
@@ -58,13 +64,20 @@ msgid ""
5864
"However, being completely deterministic, it is not suitable for all "
5965
"purposes, and is completely unsuitable for cryptographic purposes."
6066
msgstr""
67+
"幾乎所有 module 函式都相依於基本函式 :func:`.random`,此函式在半開放範圍 [0.0, 1.0] 內均勻地"
68+
"生成一個隨機 float(浮點數)。 Python 使用 Mersenne Twister (梅森旋轉演算法) 作為核心的產生"
69+
"器。 它產生 53 位元的精準 floats 以及週期為2\\*\\*19937-1。 透過 C 語言進行底層的實作既快速又"
70+
"安全。Mersenne Twister 是現存最廣泛被驗證的隨機數產生器之一。 但是基於完全確定性,它並不適合所"
71+
"有目的,並且完全不適合加密目的。"
6172

6273
#:../../library/random.rst:32
6374
msgid""
6475
"The functions supplied by this module are actually bound methods of a hidden "
6576
"instance of the :class:`random.Random` class. You can instantiate your own "
6677
"instances of :class:`Random` to get generators that don't share state."
6778
msgstr""
79+
"本章所提的 module 提供的函式實際上是 :class:`random.Random` class(類別)的隱藏實例的綁定方"
80+
"法。你可以樣例化自己的 :class:`Random` 實例,得到非共用狀態的產生器。"
6881

6982
#:../../library/random.rst:36
7083
msgid""
@@ -75,41 +88,53 @@ msgid ""
7588
"`~Random.getrandbits` method --- this allows :meth:`randrange` to produce "
7689
"selections over an arbitrarily large range."
7790
msgstr""
91+
"Class :class:`Random` 也可以進行子類化,如果你想使用你自己設計的不同的基本產生器: 在這種情況"
92+
"下,覆蓋 :meth:`~Random.random`、 :meth:`~Random.seed`、 :meth:`~Random.getstate` 和 :meth:"
93+
"`~Random.setstate` 的方式。或者,新的產生器可以提供 :meth:`~Random.getrandbits` 方法 --- 這允"
94+
"許 :meth:`randrange` 在任意大的範圍內產生選擇。"
7895

7996
#:../../library/random.rst:42
8097
msgid""
8198
"The :mod:`random` module also provides the :class:`SystemRandom` class which "
8299
"uses the system function :func:`os.urandom` to generate random numbers from "
83100
"sources provided by the operating system."
84101
msgstr""
102+
":mod:`random` module 也提供了 :class:`SystemRandom` class,使用系統函數 :func:`os.urandom` 從"
103+
"作業系統提供的來源產生隨機數。"
85104

86105
#:../../library/random.rst:48
87106
msgid""
88107
"The pseudo-random generators of this module should not be used for security "
89108
"purposes. For security or cryptographic uses, see the :mod:`secrets` module."
90109
msgstr""
110+
"本章所提及的 module 的虛擬隨機數產生器不應該使用於安全目的。 有關安全或加密用途,請參考 :mod:"
111+
"`secrets` module。"
91112

92113
#:../../library/random.rst:54
93114
msgid""
94115
"M. Matsumoto and T. Nishimura,\"Mersenne Twister: A 623-dimensionally "
95116
"equidistributed uniform pseudorandom number generator\", ACM Transactions on "
96117
"Modeling and Computer Simulation Vol. 8, No. 1, January pp.3--30 1998."
97118
msgstr""
119+
"M. Matsumoto 和 T. Nishimura,\"Mersenne Twister:623 維等分佈的均勻虛擬隨機數產生器\",ACM "
120+
"Transactions on Modeling and Computer Simulation Vol. 8, No. 1, January pp.3--30 1998."
98121

99122
#:../../library/random.rst:59
100123
msgid""
101124
"`Complementary-Multiply-with-Carry recipe <https://code.activestate.com/"
102125
"recipes/576707/>`_ for a compatible alternative random number generator with "
103126
"a long period and comparatively simple update operations."
104127
msgstr""
128+
"\"進位互補乘法實例<https://code.activestate.com/recipes/576707/>\"_,用於相容替代隨機"
129+
"數產生器,具有較長的周期和相對簡單的更新操作。"
105130

106131
#:../../library/random.rst:66
107132
msgid"Bookkeeping functions"
108-
msgstr""
133+
msgstr"簿記函式"
109134

110135
#:../../library/random.rst:70
111136
msgid"Initialize the random number generator."
112-
msgstr""
137+
msgstr"初始化隨機數產生器。"
113138

114139
#:../../library/random.rst:72
115140
msgid""
@@ -118,49 +143,59 @@ msgid ""
118143
"instead of the system time (see the :func:`os.urandom` function for details "
119144
"on availability)."
120145
msgstr""
146+
"如果省略 *a* 或\"\",則使用當前系統時間。 如果隨機源由作業系統提供,則使用它們而不是系統時"
147+
"間(有關可用性的詳細資訊,請參考 :func:`os.urandom` 函式)。"
121148

122149
#:../../library/random.rst:77
123150
msgid"If *a* is an int, it is used directly."
124-
msgstr""
151+
msgstr"如果 *a* 為 int(整數),則直接使用它。"
125152

126153
#:../../library/random.rst:79
127154
msgid""
128155
"With version 2 (the default), a :class:`str`, :class:`bytes`, or :class:"
129156
"`bytearray` object gets converted to an :class:`int` and all of its bits are "
130157
"used."
131158
msgstr""
159+
"對於版本 2(預設值),:class:`str`、:class:`bytes` 或 :class:`bytearray` 物件將轉換為 :class:"
160+
"`int`,並使用其所有位。"
132161

133162
#:../../library/random.rst:82
134163
msgid""
135164
"With version 1 (provided for reproducing random sequences from older "
136165
"versions of Python), the algorithm for :class:`str` and :class:`bytes` "
137166
"generates a narrower range of seeds."
138167
msgstr""
168+
"對於版本 1(用於從舊版本的 Python 產生隨機序列),:class:`str` 和 :class:`bytes` 的演算法會生"
169+
"成範圍更窄的種子。"
139170

140171
#:../../library/random.rst:86
141172
msgid""
142173
"Moved to the version 2 scheme which uses all of the bits in a string seed."
143-
msgstr""
174+
msgstr"移至版本 2 方案,該方案使用字串種子中的所有位。"
144175

145176
#:../../library/random.rst:89
146177
msgid""
147178
"In the future, the *seed* must be one of the following types: *NoneType*, :"
148179
"class:`int`, :class:`float`, :class:`str`, :class:`bytes`, or :class:"
149180
"`bytearray`."
150181
msgstr""
182+
"將來,*seed* 必須是以下型別之一:*NoneType*、:class:`int`、:class:`float`、:class:`str`、:"
183+
"class:`bytes` 或 :class:`bytearray`。"
151184

152185
#:../../library/random.rst:96
153186
msgid""
154187
"Return an object capturing the current internal state of the generator. "
155188
"This object can be passed to :func:`setstate` to restore the state."
156-
msgstr""
189+
msgstr"返回一個物件,捕獲發生器的當前內部狀態。 此物件可以傳遞給 :func:`setstate` 以恢復狀態。"
157190

158191
#:../../library/random.rst:102
159192
msgid""
160193
"*state* should have been obtained from a previous call to :func:`getstate`, "
161194
"and :func:`setstate` restores the internal state of the generator to what it "
162195
"was at the time :func:`getstate` was called."
163196
msgstr""
197+
"*state* 應該是從之前對 :func:`getstate` 的呼叫中獲得的,並且 :func:`setstate` 將產生器的內部狀"
198+
"態恢復到呼叫時的狀態 :func:`getstate`。"
164199

165200
#:../../library/random.rst:108
166201
msgid"Functions for bytes"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp