'Sup, World —

Python 3.3 arrives with new yield expression

New library modules also make an appearance in the next-gen code.

Today the release of Python 3.3.0 was made official, with a couple new syntax features, a handful of library modules, and several other improvements. According to Python.org’s site, the next version of the language "includes a range of improvements of the 3.x series, as well as easier porting between 2.x and 3.x."

Most notable is the yield from expression, which permits generator delegation to subgenerators or arbitrary subiterators. Python 3.3 also permits u'unicode' syntax which isn’t in itself new, but restores Python 2's Unicode literal syntax, to make more code from Python 2 valid in Python 3.

The new library modules include faulthandler for help with "debugging low-level crashes," ipaddress which includes "high-level objects representing IP addresses and masks," lzma to "compress data using the XZ / LZMA algorithm," unittest.mock to "replace parts of your system under test with mock objects," and venv for access to Python virtual environments, essentially letting you make environments isolated from the Python interpreter. Changes to the I/O exception hierarchy should also make diagnosing error messages more straightforward. Also, implicit namespace packages creates directories of modules and avoids messing with .py files.

The new version of Python comes with several other features and improvements. Check out "What's New In Python 3.3" for more details.

Channel Ars Technica