Jan-28-2021, 03:36 AM
I was interested. According to github, the original description of this function (in the python itertools recipe docs) was with
The package was created in 2012, the docs "fixed" the signature so the
n
as the first argument. The package was created in 2012, the docs "fixed" the signature so the
iterator
was the first argument in 2013, and then nobody noticed or fixed it in the package until 2019. So the old signature is in more_itertools up through 5.0.0 and the new one since 6.0.0. Looks like the ubuntu package installs 4.2.0 with the "old" signature.