3 Jul
2015
3 Jul
'15
1:29 p.m.
On Jul 2, 2015, at 08:53, Pierre Quentel
It's true, but testing that an integer is a range is very rare : the pattern "if X in range(Y)" is only found once in all the Python 3.4 standard library
Given that most of the stdlib predates Python 3.2, and modules are rarely rewritten to take advantage of new features just for the hell of it, this isn't very surprising, or very meaningful. Similarly, you'll find that most of the stdlib doesn't use yield from expressions, and many things that could be written in terms of singledispatch instead use type switching, and so on. This doesn't mean yield from or singledispatch are useless or rarely used.