Because it is. Many things are classes. calling itertools.chain(a, b) creates an itertools.chain instance that you can iterate over. What else did you think it would be?
On Wed, Apr 10, 2019 at 3:17 PM Arup Rakshit <a...@zeit.io> wrote: > 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 > > inspect.isclass(chain) > # True > > > Thanks, > > Arup Rakshit > a...@zeit.io > > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER cspea...@redhat.com M: +1.336.210.5107 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> -- https://mail.python.org/mailman/listinfo/python-list