On 1 Sep 2007, at 19:39 , Stephan Richter wrote:
On Friday 31 August 2007 23:35, Fred Drake wrote:
A biggie is going to be the replacement of immutable str for binary
data; that gets replaced with a mutable bytes object.  It'll be good
to have, but the loss of an immutable sequence-of-bytes type seems
like a problem to me.

Oh, I did not know that bytes will be mutable.

*will*? *are*.

While I see why you would want
to do this, I agree this will have some many subtle side effects that it will
take us a while to get all the code changed reliably.

One of the side effects is that bytes can't be used as dictionary keys.

Anway, looking at Py3k is nice for any sort of experiments, but I don't think we can draw any useful conclusions at this point. Too much is undecided so far:

* C API is not stable at all
* Guido doesn't know yet whether the str8 type will remain for BBB or not (str8 is the old immutable 8bit str from Python 2.x)
* Reorganization of stdlib is undecided yet.

There are other smaller things that I trust will spawn some discussion in the community and could lead to potential refactorings. One example I discovered is that open('/file/name') currently opens files in text-mode by default (even on Unix) which means it reads 'str' (unicode!) instead of bytes by default. I don't even want to know how they think they can automatically deduce whether you meant to open in text or binary mode with their '2to3' tool... And according to Guido, we're not supposed to edit the generated code for python3 either. Yeah, right.

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to