Book Image

Daniel Arbuckle's Mastering Python

By : Daniel Arbuckle
Book Image

Daniel Arbuckle's Mastering Python

By: Daniel Arbuckle

Overview of this book

Daniel Arbuckle's Mastering Python covers the basics of operating in a Python development environment, before moving on to more advanced topics. Daniel presents you with real-world solutions to Python 3.6 and advanced-level concepts, such as reactive programming, microservices, ctypes, and Cython tools. You don't need to be familiar with the Python language to use this book, as Daniel starts with a Python primer. Throughout, Daniel highlights the major aspects of managing your Python development environment, shows you how to handle parallel computation, and helps you to master asynchronous I/O with Python 3.6 to improve performance. Finally, Daniel will teach you the secrets of metaprogramming and unit testing in Python, helping you acquire the perfect skillset to be a Python expert. Daniel will get you up to speed on everything from basic programming practices to high-end tools and techniques, things that will help set you apart as a successful Python programmer.
Table of Contents (13 chapters)

Awaiting data availability

asyncio's future objects look and behave pretty much like concurrent.futures future objects, but they're not interchangeable. They have subtle differences in behavior and, of course, major differences in how they interact with the underlying systems, which are completely different. Still, each future is a way of referencing the value that may or may not have been computed yet and, if necessary, a way of waiting for that value to become available.

asyncio's future objects

The most commonly used feature of a future object is to wait for its value to be determined and then retrieve it. For asyncio's future objects, this is done by simply waiting for the future, as shown in the following...