Couverture de Guide to: Learning Iteration and Generators in Python

Guide to: Learning Iteration and Generators in Python

Aperçu
Offre à durée limitée

3 mois d'Audible Standard gratuits

3 mois pour 0,00 €/mois, puis 5,99 €/mois. Possibilité de résilier chaque mois.
Essayez pour 0,00 €/mois
L'offre prend fin le 15 Juillet 2026 à 23 h 59.
Plus d'options d'achat

Guide to: Learning Iteration and Generators in Python

De : Matt Harrison
Lu par : John Edmondson
Essayez pour 0,00 €/mois

3 mois pour 0,99 €/mois, puis 5,99 €/mois. Possibilité de résilier chaque mois. Offre valable jusqu'au 15 juillet 2026 à 23 h 59.

Acheter pour 8,91 €

Acheter pour 8,91 €

This book is one portion of Treading on Python Volume 2: Intermediate Python. That book covers this book and more. If you are interested only in iteration and generators, this book has you covered. Otherwise, check out Treading on Python Volume 2.

Iteration and Generators

Understanding iteration enables understanding generators and easily creating objects that can iterate. This guide will explain the theory behind iteration in Python and teach best practices for generator creation and use. Do not beware the yield; rather, embrace the power it provides.

The guide covers:

  • Iteration protocol
  • Iterators
  • Iterables
  • Class iteration
  • The yield statement
  • Generators
  • Function generators
  • Class generators
  • Writing Python code like the masters

These constructs, while not necessary per se, allow you to be more succinct, reuse code, and think about code in a different way. You will learn:

  • How the constructs work
  • When to use them
  • Real-life examples from the standard library
  • How to understand others' code

This book covers many of these intermediate constructs that are available in Python. The book covers both Python 2 and 3. Topics include:

  • Iteration
  • Generators
  • Using them with classes
  • Real-world examples of their use
©2013 Matt Harrison (P)2015 Matt Harrison
Programmation et développement de logiciels Réussite personnelle
adbl_web_anon_alc_button_suppression_c
Aucun commentaire pour le moment