Last time, we built a hybrid concurrent.futures executor using inheritance. Today, we're building it again (twice!) using composition and functions only, to figure out which way is better and why. Consider this a worked example.| death and gravity
New course in autumn! Application hacking and vulnerabilities. In Finnish. Teaching together with Lari Iso-Anttila. Enrollment starts 2024-05-15 w20 Wed at 08:00.Sold out , queue started. Please join un next year!| terokarvinen.com
How to create your own iterator or iterable? In Python, we have two complementary terms: iterator and iterable. An iterable is an object that has an __iter__ method which returns an iterator, or which defines a __getitem__ method that can take sequential indexes starting from zero (and raises an IndexError when the indexes are no longer valid). So, you get the iterator from the iterable object. By default __iter__ always returns self.| blog.orsinium.dev
Definitions for colloquial Python terminology (effectively an unofficial version of the Python glossary).| www.pythonmorsels.com