You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 10.-brief-tour-of-the-standard-library.md
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -249,13 +249,16 @@ class TestStatisticalFunctions(unittest.TestCase):
249
249
250
250
unittest.main() # Gọi từ dòng lệnh kích hoạt tất cả các trường hợp kiểm thử
251
251
252
-
### 10.12. Batteries Included
252
+
### 10.12. Pin đi kèm (Batteries Included)
253
253
254
-
Python has a “batteries included” philosophy. This is best seen through the sophisticated and robust capabilities of its larger packages. For example:
254
+
Python có triết lý [“pin đi kèm”](https://www.quora.com/What-does-batteries-included-philosophy-mean), tức là Python có sẵn các gói và mô-đun của chính nó mà không cần hoặc ít phụ thuộc vào mô-đun bên ngoài. Điều này là được nhìn thấy rõ nhất thông qua các khả năng tinh vi và mạnh mẽ của các gói (packages) lớn hơn của Python. Ví dụ:
255
255
256
-
* The [`xmlrpc.client`](https://docs.python.org/3/library/xmlrpc.client.html#module-xmlrpc.client) and [`xmlrpc.server`](https://docs.python.org/3/library/xmlrpc.server.html#module-xmlrpc.server) modules make implementing remote procedure calls into an almost trivial task. Despite the modules names, no direct knowledge or handling of XML is needed.
257
-
* The [`email`](https://docs.python.org/3/library/email.html#module-email) package is a library for managing email messages, including MIME and other RFC 2822-based message documents. Unlike [`smtplib`](https://docs.python.org/3/library/smtplib.html#module-smtplib) and [`poplib`](https://docs.python.org/3/library/poplib.html#module-poplib) which actually send and receive messages, the email package has a complete toolset for building or decoding complex message structures \(including attachments\) and for implementing internet encoding and header protocols.
258
-
* The [`json`](https://docs.python.org/3/library/json.html#module-json) package provides robust support for parsing this popular data interchange format. The [`csv`](https://docs.python.org/3/library/csv.html#module-csv)module supports direct reading and writing of files in Comma-Separated Value format, commonly supported by databases and spreadsheets. XML processing is supported by the [`xml.etree.ElementTree`](https://docs.python.org/3/library/xml.etree.elementtree.html#module-xml.etree.ElementTree), [`xml.dom`](https://docs.python.org/3/library/xml.dom.html#module-xml.dom) and [`xml.sax`](https://docs.python.org/3/library/xml.sax.html#module-xml.sax) packages. Together, these modules and packages greatly simplify data interchange between Python applications and other tools.
259
-
* The [`sqlite3`](https://docs.python.org/3/library/sqlite3.html#module-sqlite3) module is a wrapper for the SQLite database library, providing a persistent database that can be updated and accessed using slightly nonstandard SQL syntax.
260
-
* Internationalization is supported by a number of modules including [`gettext`](https://docs.python.org/3/library/gettext.html#module-gettext), [`locale`](https://docs.python.org/3/library/locale.html#module-locale), and the [`codecs`](https://docs.python.org/3/library/codecs.html#module-codecs)package.
256
+
* Các mô-đun [`xmlrpc.client`](https://docs.python.org/3/library/xmlrpc.client.html#module-xmlrpc.client) và [`xmlrpc.server`](https://docs.python.org/3/library/xmlrpc.server.html#module-xmlrpc.server) thực hiện các cuộc gọi thủ tục từ xa thành một nhiệm vụ gần như bình thường. Mặc dù tên mô-đun như vậy, nhưng không cần kiến thức trực tiếp hoặc xử lý XML.
261
257
258
+
* Gói [`email`](https://docs.python.org/3/library/email.html#module-email) là một thư viện để quản lý thư điện tử, bao gồm MIME và các tài liệu tin nhắn dựa trên RFC 2822 khác. Không giống như [`smtplib`](https://docs.python.org/3/library/smtplib.html#module-smtplib) và [`poplib`](https://docs.python.org/3/library/poplib.html#module-poplib) thực chất là gửi và nhận tin nhắn, gói email có bộ công cụ hoàn chỉnh để xây dựng hoặc giải mã cấu trúc thư phức tạp \(bao gồm tệp đính kèm \) và để triển khai giao thức mã hóa và tiêu đề internet.
259
+
260
+
* Gói [`json`](https://docs.python.org/3/library/json.html#module-json) cung cấp hỗ trợ mạnh mẽ để phân tích cú pháp định dạng trao đổi dữ liệu phổ biến này. Mô-đun [`csv`](https://docs.python.org/3/library/csv.html#module-csv) hỗ trợ đọc và ghi trực tiếp các tệp ở định dạng giá trị được phân tách bằng dấu phẩy (Comma-Separated Value), thường được hỗ trợ bởi cơ sở dữ liệu và bảng tính. Xử lý XML được hỗ trợ bởi các gói [`xml.etree.ElementTree`](https://docs.python.org/3/library/xml.etree.elementtree.html#module-xml.etree.ElementTree), [`xml.dom`](https://docs.python.org/3/library/xml.dom.html#module-xml.dom) và [`xml.sax`](https://docs.python.org/3/library/xml.sax.html#module-xml.sax). Cùng với nhau, các mô-đun và gói này đơn giản hóa việc trao đổi dữ liệu giữa các ứng dụng Python và các công cụ khác.
261
+
262
+
* Mô-đun [`sqlite3`](https://docs.python.org/3/library/sqlite3.html#module-sqlite3) là một trình vỏ bọc (a wrapper) cho thư viện cơ sở dữ liệu SQLite, cung cấp một cơ sở dữ liệu liên tục có thể được cập nhật và truy cập bằng cách sử dụng cú pháp SQL.
263
+
264
+
* Quốc tế hóa được hỗ trợ bởi rất nhiều mô-đun bao gồm các gói [`gettext`](https://docs.python.org/3/library/gettext.html#module-gettext), [`locale`](https://docs.python.org/3/library/locale.html#module-locale), và the [`codecs`](https://docs.python.org/3/library/codecs.html#module-codecs).
0 commit comments