Python’s simplicity means that you can transform efficient briefly, however this regularly manner you aren’t the use of the whole thing it has to provide. With this palms-on information, you’ll discover ways to write efficient, idiomatic Python code by means of leveraging its best possible—and in all probability such a lot omitted—options. Writer Luciano Ramalho takes you via Python’s center language options and libraries, and presentations you methods to make your code shorter, sooner, and extra readable on the similar time.

Many skilled programmers attempt to bend Python to suit styles they discovered from different languages, and not uncover Python options out of doors in their revel in. With this guide, the ones Python programmers will completely discover ways to transform talented in Python 3.

This guide covers:

  • Python information type: take note how different strategies are the important thing to the constant conduct of objects
  • Data systems: take complete good thing about integrated sorts, and take note the textual content vs bytes duality within the Unicode age
  • Functions as gadgets: view Python purposes as top notch gadgets, and take note how this impacts fashionable layout patterns
  • Object-orientated idioms: construct categories by means of studying approximately references, mutability, interfaces, operator overloading, and more than one inheritance
  • Control float: leverage context managers, turbines, coroutines, and concurrency with the concurrent.futures and asyncio packages
  • Metaprogramming: take note how homes, characteristic descriptors, elegance decorators, and metaclasses work