This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jstasiak
Recipients jstasiak
Date 2016-02-10.22:55:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Since mmap objects are said to "behave like both bytearray and like file objects" I believe it's appropriate for the mmap.write() method to return the number of bytes written like write() of other file objects/interfaces I could find in the standard library for consistency reasons:

Why I believe this would be useful: code that writes to file objects and tests the number of bytes/characters written right now will likely fail when it's passed a mmap object because its write() method returns None. With this patch applied it'll work transparently.

Please find proposed patch attached, I included information about the exception type in the documentation as it seems fitting (apologies for generating the patch using Git, I'll generate using Mercurial if necessary).
Date User Action Args
2016-02-10 22:55:38jstasiaksetrecipients: + jstasiak
2016-02-10 22:55:37jstasiaksetmessageid: <>
2016-02-10 22:55:37jstasiaklinkissue26335 messages
2016-02-10 22:55:37jstasiakcreate