On Sun, Nov 28, 2021 at 10:35:34PM -0800, Christopher Barker wrote: > Of course, Python being Python, if in a given use case, you don’t need > __iter__, you don’t have to have it.
[cynicism=on] If you think your iterator doesn't need `__iter__`, just wait, and you will find that it does. [cynicism=off] This is Python. We will defend your right to create a class that uses `__eq__` to delete files and `__add__` to multiply :-) > Just like the fact that you can pass anything with an appropriate read() > method into json.load() will work, but that doesn’t make it a File. Exactly. -- Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HFLBOO73LC5QIILF4LEACMKBC5LQ2ZO4/ Code of Conduct: http://python.org/psf/codeofconduct/