On Thu, Mar 3, 2022 at 9:58 AM Kevin Mills <kevin.mills226@gmail.com> wrote:
I actually initially was going to suggest a `strict` flag get added, but I figured that would be impractical. I was mostly concerned about classes that mimic file objects, because (obviously) their read methods wouldn't include a `strict` flag and you couldn't pass such objects to functions using the flag.
you couldn't pass them to functions using a new method, either.

No matter how you slice it, this would be an extension to the existing file-like object "protocol"

I use quotes because I don't think it's a clearly defined protocol.

-CHB

 
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@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/2GYOXX5XNKN276ITAMZPIUJXIAJU6WPB/
Code of Conduct: http://python.org/psf/codeofconduct/


--
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython