官术网_书友最值得收藏!

Other changes in Python packages

Some low-level improvements have been made in Python since version 3.5, such as faster reading of filesystem directories, automatic retrying of interrupted operating system calls, and a math.isclose function for checking whether two numbers are approximately equal.

There are also a bunch of more minor additions that improve things throughout the standard library, all backwards compatible with earlier Python 3 versions.

In the rare cases where something is added that breaks backwards compatibility, it's not enabled by default. For such a change, if we want to use it, we'd have to specifically mark our code as supporting the change. Those changes will not become standard until two versions later, so a breaking change in Python 3.5 would not become the default until Python version 3.7, with Python 3.5 and 3.6 issuing warnings when they encounter code that depends on the changing feature.

In Python 3.5, there was only one such change-a small and smart alteration in the iteration protocol. It shouldn't have any effect on code that works properly, but technically it's a change in the interface and so it gets the full wait two versions treatment.

If you want more detail about any of these changes I've mentioned, or if you ever want to find out what's changed between versions of Python, the documentation on https://docs.python.org/3/ always contains a what's new document that goes into some detail about new features and provides links to the full documentation.

For details on the Python 3.6 what's new document, visit the following link:
https://docs.python.org/3/whatsnew/3.6.html

I always look forward to reading the what's new document for each release of Python, to find out what new toys I've just been handed.

So, we've now taken a high-level view of the Python standard library, introducing us to some of the more useful items it contains. That brings us to the end of our Python primer.

主站蜘蛛池模板: 镇赉县| 巢湖市| 雅江县| 香港| 昌乐县| 荔浦县| 彭州市| 蒲江县| 东方市| 泰安市| 农安县| 志丹县| 上饶县| 宁河县| 苍梧县| 五大连池市| 方正县| 花莲市| 大兴区| 来宾市| 木兰县| 江孜县| 澄江县| 永康市| 宁安市| 卓尼县| 武穴市| 青冈县| 金昌市| 大同县| 武冈市| 乳源| 阿荣旗| 仁寿县| 靖边县| 凌云县| 屏东市| 石嘴山市| 丁青县| 奉新县| 资中县|