{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Python Cookbook(第3版)中文版

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Python Cookbook(第3版)中文版

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Content Description

《Python Cookbook(第3版)中文版》介绍了Python应用在各个领域中的一些使用技巧和方法,其主题涵盖了数据结构和算法,字符串和文本,数字、日期和时间,迭代器和生成器,文件和I/O,数据编码与处理,函数,类与对象,元编程,模块和包,网络和Web编程,并发,实用脚本和系统管理,测试、调试以及异常,C语言扩展等。
《Python Cookbook(第3版)中文版》覆盖了Python应用中的很多常见问题,并提出了通用的解决方案。书中包含了大量实用的编程技巧和示例代码,并在Python 3.3环境下进行了测试,可以很方便地应用到实际项目中去。此外,《Python Cookbook(第3版)中文版》还详细讲解了解决方案是如何工作的,以及为什么能够工作。
《Python Cookbook(第3版)中文版》非常适合具有一定编程基础的Python程序员阅读参考。

Author Description

David Beazley是一位居住在芝加哥的独立软件开发者以及图书作者。他主要的工作在于编程工具,提供定制化的软件开发服务,以及为软件开发者、科学家和工程师教授编程实践课程。他最为人熟知的工作在于Python编程语言,他已为此创建了好几个开源的软件包(例如Swig和PLY),并且是备受赞誉的图书Python Essential Reference的作者。他也对C、C++以及汇编语言下的系统编程有着丰富的经验。

Brain K. Jones是普林斯顿大学计算机系的一位系统管理员。

Catalogue

第1章数据结构和算法 1
1.1将序列分解为单独的变量 1
1.2从任意长度的可迭代对象中分解元素 3
1.3保存最后N个元素 5
1.4找到最大或最小的N个元素 7
1.5实现优先级队列 9
1.6在字典中将键映射到多个值上 11
1.7让字典保持有序 13
1.8与字典有关的计算问题 14
1.9在两个字典中寻找相同点 15
1.10从序列中移除重复项且保持元素间顺序不变 17
1.11对切片命名 18
1.12找出序列中出现次数最多的元素 20
1.13通过公共键对字典列表排序 22
1.14对不原生支持比较操作的对象排序 23
1.15根据字段将记录分组 25
1.16筛选序列中的元素 26
1.17从字典中提取子集 29
1.18将名称映射到序列的元素中 30
1.19同时对数据做转换和换算 33
1.20将多个映射合并为单个映射 34
第2章字符串和文本 37
2.1针对任意多的分隔符拆分字符串 37
2.2在字符串的开头或结尾处做文本匹配 38
2.3利用Shell通配符做字符串匹配 40
2.4文本模式的匹配和查找 42
2.5查找和替换文本 45
2.6以不区分大小写的方式对文本做查找和替换 47
2.7定义实现最短匹配的正则表达式 48
2.8编写多行模式的正则表达式 49
2.9将Unicode文本统一表示为规范形式 50
2.10用正则表达式处理Unicode字符 52
2.11从字符串中去掉不需要的字符 53
2.12文本过滤和清理 54
2.13对齐文本字符串 57
2.14字符串连接及合并 59
2.15给字符串中的变量名做插值处理 62
2.16以固定的列数重新格式化文本 64
2.17在文本中处理HTML和XML实体 66
2.18文本分词 67
2.19编写一个简单的递归下降解析器 70
2.20在字节串上执行文本操作 80
第3章数字、日期和时间 83
3.1对数值进行取整 83
3.2执行精确的小数计算 85
3.3对数值做格式化输出 87
3.4同二进制、八进制和十六进制数打交道 89
3.5从字节串中打包和解包大整数 90
3.6复数运算 92
3.7处理穷大和NaN 94
3.8分数的计算 96
3.9处理大型数组的计算 97
3.10矩阵和线性代数的计算 101
3.11随机选择 103
3.12时间换算 105
3.13计算上周5的日期 107
3.14找出当月的日期范围 108
3.15将字符串转换为日期 110
3.16处理涉及到时区的日期问题 112
第4章迭代器和生成器 114
4.1手动访问迭代器中的元素 114
4.2委托迭代 115
4.3用生成器创建新的迭代模式 116
4.4实现迭代协议 118
4.5反向迭代 121
4.6定义带有额外状态的生成器函数 122
4.7对迭代器做切片操作 123
4.8跳过可迭代对象中的前一部分元素 124
4.9迭代所有可能的组合或排列 127
4.10以索引-值对的形式迭代序列 129
4.11同时迭代多个序列 131
4.12在不同的容器中进行迭代 133
4.13创建处理数据的管道 134
4.14扁平化处理嵌套型的序列 137
4.15合并多个有序序列,再对整个有序序列进行迭代 139
4.16用迭代器取代while循环 140
第5章文件和I/O 142
5.1读写文本数据 142
5.2将输出重定向到文件中 145
5.3以不同的分隔符或行结尾符完成打印 145
5.4读写二进制数据 146
5.5对已不存在的文件执行写入操作 149
5.6在字符串上执行I/O操作 150
5.7读写压缩的数据文件 151
5.8对固定大小的记录进行迭代 152
5.9将二进制数据读取到可变缓冲区中 153
5.10对二进制文件做内存映射 155
5.11处理路径名 157
5.12检测文件是否存在 158
5.13获取目录内容的列表 159
5.14绕过文件名编码 161
5.15打印法解码的文件名 162
5.16为已经打开的文件添加或修改编码方式 164
5.17将字节数据写入文本文件 166
5.18将已有的文件描述符包装为文件对象 167
5.19创建临时文件和目录 169
5.20同串口进行通信 171
5.21序列化Python对象 172
第6章数据编码与处理 177
6.1读写CSV数据 177
6.2读写JSON数据 181
6.3解析简单的XML文档 186
6.4以增量方式解析大型XML文件 188
6.5将字典转换为XML 192
6.6解析、修改和重写XML 194
6.7用命名空间来解析XML文档 196
6.8同关系型数据库进行交互 198
6.9编码和解码十六进制数字 201
6.10Base64编码和解码 202
6.11读写二进制结构的数组 203
6.12读取嵌套型和大小可变的二进制结构 207
6.13数据汇总和统计 218
第7章函数 221
7.1编写可接受任意数量参数的函数 221
7.2编写只接受关键字参数的函数 223
7.3将元数据信息附加到函数参数上 224
7.4从函数中返回多个值 225
7.5定义带有默认参数的函数 226
7.6定义匿名或内联函数 229
7.7在匿名函数中绑定变量的值 230
7.8让带有N个参数的可调用对象以较少的参数形式调用 232
7.9用函数替代只有单个方法的类 235
7.10在回调函数中携带额外的状态 236
7.11内联回调函数 240
7.12访问定义在闭包内的变量 242
第8章类与对象 246
8.1修改实例的字符串表示 246
8.2自定义字符串的输出格式 248
8.3让对象支持上下文管理协议 249
8.4当创建大量实例时如何节省内存 251
8.5将名称封装到类中 252
8.6创建可管理的属性 254
8.7调用父类中的方法 259
8.8在子类中扩展属性 263
8.9创建一种新形式的类属性或实例属性 267
8.10让属性具有惰性求值的能力 271
8.11简化数据结构的初始化过程 274
8.12定义一个接口或抽象基类 278
8.13实现一种数据模型或类型系统 281
8.14实现自定义的容器 287
8.15委托属性的访问 291
8.16在类中定义多个构造函数 296
8.17不通过调用init来创建实例 298
8.18用Mixin技术来扩展类定义 299
8.19实现带有状态的对象或状态机 305
8.20调用对象上的方法,方法名以字符串形式给出 311
8.21实现访问者模式 312
8.22实现非递归的访问者模式 317
8.23在环状数据结构中管理内存 324
8.24让类支持比较操作 327
8.25创建缓存实例 330
第9章元编程 335
9.1给函数添加一个包装 335
9.2编写装饰器时如何保存函数的元数据 337
9.3对装饰器进行解包装 339
9.4定义一个可接受参数的装饰器 341
9.5定义一个属性可由用户修改的装饰器 342
9.6定义一个能接收可选参数的装饰器 346
9.7利用装饰器对函数参数强制执行类型检查 348
9.8在类中定义装饰器 352
9.9把装饰器定义成类 354
9.10把装饰器作用到类和静态方法上 357
9.11编写装饰器为被包装的函数添加参数 359
9.12利用装饰器给类定义打补丁 362
9.13利用元类来控制实例的创建 364
9.14获取类属性的定义顺序 367
9.15定义一个能接受可选参数的元类 370
9.16在*args和**kwargs上强制规定一种参数签名 372
9.17在类中强制规定编码约定 375
9.18通过编程的方式来定义类 378
9.19在定义的时候初始化类成员 382
9.20通过函数注解来实现方法重载 384
9.21避免出现重复的属性方法 391
9.22以简单的方式定义上下文管理器 393
9.23执行带有局部副作用的代码 395
9.24解析并分析Python源代码 398
9.25将Python源码分解为字节码 402
第10章模块和包 406
10.1把模块按层次结构组织成包 406
10.2对所有符号的导入进行精确控制 407
10.3用相对名称来导入包中的子模块 408
10.4将模块分解成多个文件 410
10.5让各个目录下的代码在统一的命名空间下导入 413
10.6重新加载模块 415
10.7让目录或zip文件成为可运行的脚本 416
10.8读取包中的数据文件 417
10.9添加目录到sys.path中 418
10.10使用字符串中给定的名称来导入模块

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book