@@ -61,8 +61,8 @@ msgid ""
6161"addresses, the first thing you'll want to do is create some objects. You "
6262"can use :mod:`ipaddress` to create objects from strings and integers."
6363msgstr ""
64- "由於 :mod:ipaddress 是一個用於檢查和操作 IP 位址的模組,你首先會想要做的事情"
65- "是建立一些物件。你可以使用 :mod:ipaddress 從字串和整數建立物件。"
64+ "由於 :mod:` ipaddress` 是一個用於檢查和操作 IP 位址的模組,你首先會想要做的事情"
65+ "是建立一些物件。你可以使用 :mod:` ipaddress` 從字串和整數建立物件。"
6666
6767#: ../../howto/ipaddress.rst:32
6868msgid "A Note on IP Versions"
@@ -106,7 +106,7 @@ msgid ""
106106"value:"
107107msgstr ""
108108"位址,通常被稱為「主機位址」,是處理 IP 定址時最基本的單位。建立位址最簡單的"
109- "方法是使用 :func:ipaddress.ip_address 工廠函式,它會根據傳入的值自動判斷要建"
109+ "方法是使用 :func:` ipaddress.ip_address` 工廠函式,它會根據傳入的值自動判斷要建"
110110"立 IPv4 還是 IPv6 位址:"
111111
112112#: ../../howto/ipaddress.rst:61
@@ -168,7 +168,7 @@ msgid ""
168168"whether or not an address is part of the network and the network address "
169169"defines the expected value of those bits."
170170msgstr ""
171- "主機位址通常會被分組到 IP 網路中,因此 :mod:ipaddress 提供了一種建立、檢查和"
171+ "主機位址通常會被分組到 IP 網路中,因此 :mod:` ipaddress` 提供了一種建立、檢查和"
172172"操作網路定義的方法。IP 網路物件是從定義該網路所包含之主機位址範圍的字串建構而"
173173"成。這些資訊最簡單的形式是「網路位址/網路前綴」配對,其中前綴定義了用於比較的"
174174"前導位元數量,以判斷位址是否屬於該網路的一部分,而網路位址則定義了這些位元的"
@@ -211,7 +211,7 @@ msgid ""
211211"bits instead be coerced to zero, the flag ``strict=False`` can be passed to "
212212"the constructor::"
213213msgstr ""
214- "預設情況下,嘗試建立帶有主機位元設定的網路物件會導致引發 :exc:ValueError。若"
214+ "預設情況下,嘗試建立帶有主機位元設定的網路物件會導致引發 :exc:` ValueError` 。若"
215215"要求將額外的位元強制轉換為零,可以在建構子中傳遞旗標 strict=False: ::"
216216
217217#: ../../howto/ipaddress.rst:112
@@ -279,7 +279,7 @@ msgid ""
279279msgstr ""
280280"如上所述,如果你需要描述特定網路上的位址,位址類別和網路類別都不足以滿足需"
281281"求。像 192.0.2.1/24 這樣的標記法通常被網路工程師以及編寫防火牆和路由器工具的"
282- "人用作「網路 192.0.2.0/24 上的主機 192.0.2.1」的簡寫。因此,:mod:ipaddress 提"
282+ "人用作「網路 192.0.2.0/24 上的主機 192.0.2.1」的簡寫。因此,:mod:` ipaddress` 提"
283283"供了一組混合類別,將位址與特定網路關聯起來。建立介面的方式與定義網路物件相"
284284"同,只是位址部分不受限於必須是網路位址。"
285285
@@ -302,7 +302,7 @@ msgid ""
302302"it. :mod:`ipaddress` tries to make doing this easy and intuitive."
303303msgstr ""
304304"你費心建立了 IPv(4|6)(Address|Network|Interface) 物件,所以你可能想要取得關於"
305- "它的資訊。:mod:ipaddress 試圖讓這件事變得簡單且直觀。"
305+ "它的資訊。:mod:` ipaddress` 試圖讓這件事變得簡單且直觀。"
306306
307307#: ../../howto/ipaddress.rst:163
308308msgid "Extracting the IP version::"
@@ -508,7 +508,7 @@ msgid ""
508508":mod:`ipaddress` provides some simple, hopefully intuitive ways to compare "
509509"objects, where it makes sense::"
510510msgstr ""
511- ":mod:ipaddress 提供了一些簡單且希望是直觀的方法來比較物件,只要這樣做有道"
511+ ":mod:` ipaddress` 提供了一些簡單且希望是直觀的方法來比較物件,只要這樣做有道"
512512"理: ::"
513513
514514#: ../../howto/ipaddress.rst:274
@@ -523,7 +523,7 @@ msgstr ""
523523msgid ""
524524"A :exc:`TypeError` exception is raised if you try to compare objects of "
525525"different versions or different types."
526- msgstr "如果你嘗試比較不同版本或不同類型的物件,會引發 :exc:TypeError 例外。"
526+ msgstr "如果你嘗試比較不同版本或不同類型的物件,會引發 :exc:` TypeError` 例外。"
527527
528528#: ../../howto/ipaddress.rst:282
529529msgid "Using IP Addresses with other modules"
@@ -535,7 +535,7 @@ msgid ""
535535"accept objects from this module directly. Instead, they must be coerced to "
536536"an integer or string that the other module will accept::"
537537msgstr ""
538- "其他使用 IP 位址的模組(例如 :mod:socket)通常不會直接接受來自此模組的物件。"
538+ "其他使用 IP 位址的模組(例如 :mod:` socket` )通常不會直接接受來自此模組的物件。"
539539"相反地,它們必須被強制轉換為其他模組能接受的整數或字串: ::"
540540
541541#: ../../howto/ipaddress.rst:288
@@ -566,7 +566,7 @@ msgid ""
566566"IPv6 in order to provide more detail on why it has been rejected."
567567msgstr ""
568568"當使用版本無關的工廠函式建立位址/網路/介面物件時,任何錯誤都會"
569- "以 :exc:ValueError 回報,並附帶一個通用的錯誤訊息,簡單地說明傳入的值未被識別"
569+ "以 :exc:` ValueError` 回報,並附帶一個通用的錯誤訊息,簡單地說明傳入的值未被識別"
570570"為該類型的物件。缺乏具體錯誤的原因是,為了提供更多關於為何被拒絕的細節,需要"
571571"知道該值應該是 IPv4 還是 IPv6。"
572572
@@ -579,8 +579,8 @@ msgid ""
579579"definition failed to parse correctly."
580580msgstr ""
581581"為了支援需要存取這些額外細節的使用情境,個別類別建構子實際上會引"
582- "發 :exc:ValueError 的子類別 :exc:ipaddress.AddressValueError "
583- "和 :exc:ipaddress.NetmaskValueError,以明確指出定義的哪個部分無法正確解析。"
582+ "發 :exc:` ValueError` 的子類別 :exc:` ipaddress.AddressValueError` "
583+ "和 :exc:` ipaddress.NetmaskValueError` ,以明確指出定義的哪個部分無法正確解析。"
584584
585585#: ../../howto/ipaddress.rst:311
586586msgid ""
@@ -634,7 +634,7 @@ msgid ""
634634"their parent class, so if you're not concerned with the particular type of "
635635"error, you can still write code like the following::"
636636msgstr ""
637- "然而,這兩個模組特定的例外都以 :exc:ValueError 作為它們的父類別,因此如果你不"
637+ "然而,這兩個模組特定的例外都以 :exc:` ValueError` 作為它們的父類別,因此如果你不"
638638"關心特定類型的錯誤,你仍然可以撰寫如下的程式碼: ::"
639639
640640#: ../../howto/ipaddress.rst:336
@@ -648,3 +648,4 @@ msgstr ""
648648" network = ipaddress.IPv4Network(address)\n"
649649"except ValueError:\n"
650650" print('address/netmask is invalid for IPv4:', address)"
651+
0 commit comments