Guido van Rossum added the comment: Sigh, I was wrong, not only does mypy promote bytearray to bytes, it actually depends on this in its own code. Not for filenames, but for a regex match. It reads the source into a bytearray, and then passes that to something that uses regex matches (which *do* support bytearrays, and rightly so). If I remove the bytearray promotion I run into some type errors, and if I fix those (without copying data) I run into more type errors. I guess we could fix it by carefully marking up everything that takes bytearrays in the stubs, but it's surely inconvenient. So maybe I'll leave this in mypy for now.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26800> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com