[IronPython] bytes and str in 2.7 io module

Vernon Cole vernondcole at gmail.com
Tue Nov 9 03:30:54 CET 2010


Jeff:
  Make sure to check the Python 3 bindings as well. We don't want to loose
ground going in that direction, since IPy already has Python 3's best
feature -- all strings are Unicode. Maybe the equivalent of "if
sys.version[0] >= '3':" should be buried in the helper so that that wheel
will not need to be re-invented in the future.  Just a thought.
--
Vernon


On Mon, Nov 8, 2010 at 11:55 AM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Mon, Nov 8, 2010 at 10:55 AM, Dino Viehland <dinov at microsoft.com>
> wrote:
> > Ahh, yeah, we should probably have a helper method in here which will
> convert
> > the string back to bytes rather than all of these casts to Bytes.  It
> could also be
> > incompatible w/ CPython in that they *might* allow bytearray objects to
> be returned
> > too which these casts would also prevent.
>
> I'll check what CPython allows (I presume you're still prohibited from
> looking at the source for it?). I have a patch that checks for strings
> as well, but I'm not happy with it yet.
>
> - Jeff
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101108/2b57caf3/attachment.html>


More information about the Ironpython-users mailing list