Josh Rosenberg <shadowranger+pyt...@gmail.com> added the comment:
Ah, right. It doesn't actually validate the mode string (it just stores it for when open is called, assuming open will validate it). So yeah, it silently accepts any string, not just valid mode strings. Not a contractual guarantee or anything, just how FileType.__init__ is implemented. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37150> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com