On Sun, Dec 15, 2019 at 11:45 AM David Mertz <me...@gnosis.cx> wrote:
> Hmm, interesting -- so this means that you do write code expecting a >> generic iterator, rather than a file-like object. >> > > How file-like do you need? I've certainly written things that usually take > an actual file, but sometimes get io.StringIO, or an SQL cursor. > file-like enough to have a .readline() method. which I expect an SQL cursor does not (or does it?) It all depends on what interface a given object is emulating -- I've always thought in terms of file-like objects, but maybe iterator_of_lines is more generic. -CHB -- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ 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/36JXRYGB24BPBUCPWD4NUAYCCAAV6YCO/ Code of Conduct: http://python.org/psf/codeofconduct/