![]() ![]() M any more standard library APIs, including the builtin open(), now support pathlib.Path and pathlib.PurePath objects through the new os.fspath() protocol. ![]() U nderscores in numeric literals let you break up magic constants to make them easier to read. bytes, hex strings, base64 strings) with a reasonable default amount of entropy. ![]() T he new secrets module provides handy helpers for secure token generation in various formats (e.g. Previously the apparent key order in the source code would be lost in the process of calling the constructor. So collections.OrderedDict(first=1, second=2, third=2) finally works the way you would expect it to work. K eyword arguments now preserve their order. The literals are especially helpful for scripting use cases. They are also easier to read, since you don’t need to mentally map expressions to their corresponding fields. This results in zero runtime string parsing overhead. The new literals are faster than runtime formatting, since the string gets broken up into text segments and field expressions at compile time. Python 3.6 offers compile time processing of format strings with the new f-string literals: print(f"There were. M ajor changes Formatted string literals (f-strings) For a full list of new features check out the upstream docs. This article gives a quick overview of what to expect. Python 3.6 comes with many new enhancements and optimizations. Type "help", "copyright", "credits" or "license" for more information. You can then invoke the new version’s shell with the command python36 or python3.6. For those who want to experience the new Python features in Fedora 25 or Fedora 24, a python36 package is now available. Users running Fedora R awhide already e njoy Python 3.6. The upcoming Fedora 26 release will include Python 3.6.0. On December 23, 2016, the Python community released Python 3.6.0, the latest version of the popular programming language. ![]()
0 Comments
Leave a Reply. |