3 ms·
Generators and sets have been around for a long time I think. They were there in 2.X version like 9-10 years ago when I first used Python anyway and aren't 3 s
by mythrwy 7y ago
Generators and sets have been around for a long time I think.
They were there in 2.X version like 9-10 years ago when I first used Python anyway and aren't 3 specific.
- jwilk 7y agoGenerators were added in Python 2.2: https://docs.python.org/2/whatsnew/2.2.html#pep-255-simple-generators https://docs.python.org/2/whatsnew/2.2.html#pep-255-simple-g... Built-in set objects were added in Python 2.4: https://docs.python.org/2/whatsnew/2.4.html#pep-218-built-in-set-objects https://docs.python.org/2/whatsnew/2.4.html#pep-218-built-in... defaultdict was added in Python 2.5: https://docs.python.org/2/library/collections.html#collections.defaultdict https://docs.python.org/2/library/collections.html#collectio...