+ 1

Why doesn't __iter__ = self.list.__iter__ work?

if I have a class like class CustomList(): def __init__(self, list): self.list = list How can I make my class iterate on self.list when needed? I tried doing __iter__ = self.list.__iter__ but it's not working

4th Aug 2018, 5:56 PM
TheNewHEROBRINE
TheNewHEROBRINE - avatar
1 Answer
5th Aug 2018, 1:52 AM
John Wells
John Wells - avatar