【py code everyday】new third edition is come

今天开始学习第三版书,由于第三版做了大量更新,所以计划先双线路走
第三版用了vscode,而非pycharm、sublime,unittest换成了pytest
以及其他的一些内容都做了更新
第一线路用将通过eng来学习
line one:eng-learn for the third edition
第二线路是仍将使用第二版来学习
line two:leap the chapter 12-14 and begin with the chapter 15

Let’s go

Python is a mature language, but like every programming language it continues to evolve.
The third edition incorporates the most important new features in Python, without becoming bloated by trying to include every new feature that’s been introduced in recent years.
The new edition uses the latest versions of all third-party libraries in the projects section.

Overall changes

Here’s a summary of the changes that have been made to the book overall:

The third edition uses Python 3.11. (The second edition was written using Python 3.7.)
The new edition uses VS Code instead of Sublime Text. VS Code is fully open, and has seen widespread adoption in the Python world over the last several years.
Code listings are less cluttered and easier to follow throughout the book.
The new edition uses updated libraries throughout, and updated workflows for each library.

Specific changes

Chapter 1

In the setup section, VS Code is recommended as a text editor for readers who don’t already have a preference. (You can use any editor that’s properly configured to run Python code.)

Chapter 2

This chapter introduces removeprefix() and removesuffix(), two new methods that are helpful when working with files and URLs.
Chapter 2 also includes Python’s newly-improved error messages, which provide much more specific information to help you troubleshoot your code when something goes wrong.

Chapters 3-9

Many explanations have been clarified, and code listings have been simplified. (There were some annotations in shorter listings that weren’t really necessary.)

Chapter 10

Chapter 10 uses the pathlib module for working with files. This is a much simpler approach to reading from and writing to files. It’s also in keeping with how most major libraries are working with files now.

Chapter 11

pytest is now the main testing library in the Python world. It’s accessible to beginners, but powerful enough to serve professional testing needs as well. Chapter 11 now uses pytest instead of the standard library’s unittest.
This chapter shows how to install third-party libraries, instead of introducing the topic in several different projects in the second half of the book.

Alien Invasion (Chapters 12-14)

The game uses an FPS (frames per second) setting, to make it run more consistently across all systems.
The approach to building the alien fleet is simpler and easier to understand.
The code listings throughout the project are presented in an order that’s easier to follow.

Data Visualization (Chapters 15-17)

Matplotlib has changed some of its default style settings; all figures in the new edition match the current default styles.
Plotly has introduced Plotly Express, a module that focuses on building an initial plot quickly, and then making styling choices. The third edition uses this new approach.
The random walk project has a small improvement that increases the accuracy of the plots; you’ll see a wider variety of patterns emerge each time you generate a new walk.
The weather and earthquake projects use updated data sets.
The GitHub data used in Chapter 17 is fully updated.

Web Applications (Chapters 18-20)

The Learning Log project is built using Django 4.1, and the project is styled using Bootstrap 5.
Some parts of the project have been renamed to make it easier to understand the overall layout of a Django project.
The deployment section has been updated. The project is now deployed to Platform.sh, a modern hosting service for Django projects. The deployment process is controlled by YAML configuration files, which give you a great deal of control over how your project is deployed. This approach is consistent with how professional programmers deploy modern Django projects.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值