[Python-3000] Fwd: Beta 3 planned for this Wednesday (OT: Beta 3 planned for this Wednesday)

Gregory P. Smith greg at krypto.org
Fri Sep 5 09:17:13 CEST 2008


Anyone have an opinion on http://bugs.python.org/issue3492 in regards
to it being a release blocker?

The gist of it:  zlib returns bytearrays where other modules return
bytes.  zipimport, because it uses zlib, required bytearrays instead
of bytes as input.  A few other modules also appear to return
bytearrays when they're likely better off returning bytes for
consistency.

IMHO, it seems like bytearrays should rarely be returned by the
existing standard library apis.  Since they are mutable they are
ideally suited for new APIs where they're passed in and modified.

Whats the big deal if this is not fixed before release?  Users are
likely to get frustrated at inputs not being hashable without explicit
(data copy) conversion to an immutable type.  And any code that gets
written depending on these returning bytearrays instead of bytes would
need fixing if we waited until 3.1 to fix it.

-gps

On Wed, Sep 3, 2008 at 10:42 PM, Anand Balachandran Pillai
<abpillai at gmail.com> wrote:
> On Thu, Sep 4, 2008 at 10:47 AM, Gregory P. Smith <greg at krypto.org> wrote:
>> I agree that this should go in.  zlib should return bytes.  other read
>> functions and similar modules like bz2module already return bytes.
>> unless i hear objections, i'll commit this in about 12 hours.
>
> +1  :)
>
>>
>
> Regards
>
> --
> -Anand
>


More information about the Python-3000 mailing list