Author gvanrossum
Recipients Ronan.Lamy, gvanrossum, larry, pitrou, pjenvey, serhiy.storchaka, vstinner
Date 2016-04-24.16:05:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461513935.28.0.952913246784.issue26800@psf.upfronthosting.co.za>
In-reply-to
Content
OK, I actually agree with you on memoryview and and other types that support the buffer view. I will update PEP 484 to exclude memoryview. But I think bytearray has a special role and purose, and as much as possible it needs to be accepted in places that support bytes. So IMO as long as the os module supports bytes at all, I see no reason not to support bytearray. (It even has the extra trailing \0 needed to pass it to a typical C function.)

So as long as we support bytes (and on Linux, and probably some other Unixoid systems, bytes are the *correct* type for paths) we should also support bytearray.

The issue that Path doesn't support bytes is separate. I think it's the right choice. But that doesn't mean e.g. os.listdir() shouldn't support bytes.
History
Date User Action Args
2016-04-24 16:05:35gvanrossumsetrecipients: + gvanrossum, pitrou, vstinner, larry, pjenvey, serhiy.storchaka, Ronan.Lamy
2016-04-24 16:05:35gvanrossumsetmessageid: <1461513935.28.0.952913246784.issue26800@psf.upfronthosting.co.za>
2016-04-24 16:05:35gvanrossumlinkissue26800 messages
2016-04-24 16:05:35gvanrossumcreate