Why inspect.isclass says iter() a class?

Arup Rakshit ar at zeit.io
Wed Apr 10 15:17:08 EDT 2019

From docs https://docs.python.org/3/library/itertools.html#itertools.chain I see that itertools.chain is defined as a function. But then why inspect.isclass(chain) is saying it as class.

from itertools import chain

# True


Arup Rakshit
ar at zeit.io

More information about the Python-list mailing list