Contribute Media
Viewing PR #272
A thank you to everyone who makes this possible: Read More

What's Coming in 3.8: Assignment Expressions & More!


This talk was presented at PyBay2019 - 4th annual Bay Area Regional Python conference. See for more details about PyBay and click SHOW MORE for more information about this talk.

Description Curious what's coming next for Python? Well, Python 3.8 is being released just a few short months. It already includes a number of new features such as assignment expressions, improved debugging, more string formatting features, and many smaller changes. Come learn about the big ones and some of the more interesting small ones too!

Abstract I'll start out with the major new features and their PEPs (listed below, but also including any more added before the talk):

Assignment expressions

There is new syntax (the “walrus operator”, :=) to assign values to variables as part of an expression.

Positional-only parameters

There is new syntax (/) to indicate that some function parameters must be specified positionally (i.e., cannot be used as keyword arguments).

Parallel filesystem cache for compiled bytecode files

The new PYTHONPYCACHEPREFIX setting (also available as -X pycache_prefix) configures the implicit bytecode cache to use a separate parallel filesystem tree, rather than the default pycache subdirectories within each source directory.

Debug build uses the same ABI as release build

Python now uses the same ABI whether it built in release or debug mode. On Unix, when Python is built in debug mode, it is now possible to load C extensions built in release mode and C extensions built using the stable ABI.

f-strings now support = for quick and easy debugging

Add = specifier to f-strings. f'{expr=}' expands to the text of the expression, an equal sign, then the repr of the evaluated expression. So: Then I'll talk about a few of the smaller features such as continue inside finally, iterable unpacking in yield and return, new SyntaxWarnings, etc.

About the speaker I'm an Engineering and Community Lead @ Braintree. At work I do a variety of things from technical architecture and planning to facilitating conference and event sponsorships. Outside of work, I'm coding enthusiast and frequent traveler, splitting my time between the city and the Great North Woods. Find me online or at local Python events in either Chicago or Burlington, VT.

Sponsor Acknowledgement This and other PyBay2019 videos are via the help of our media partner AlphaVoice (!

#pybay #pybay2019 #python #python3


Improve this page