Tuesday, March 26, 2019

NEW GUIDE: Itertools for CircuitPython #CircuitPython #Libraries #AdafruitLearningSystem @Adafruit @DAstels

A new guide in the Adafruit Learning System: Itertools for CircuitPython.

Itertools is a very handy library available in CPython (Standard Python) and now there is an Adafruit port to use in CircuitPython. From docs.python.org:

This module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML. Each has been recast in a form suitable for Python.

The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an “iterator algebra” making it possible to construct specialized tools succinctly and efficiently in pure Python.

This helps also if you are looking at porting Python code which relies on itertools. Rather than recreate the functions, they are now available with a simple import statement.

See the new guide on the Adafruit Learning System now.

No comments:

Post a Comment