Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-13 Thread Nick Coghlan
On 13 Sep 2014 10:18, "Jeff Allen"  wrote:
> 4. I think (with Antoine) if Jython supported PEP-383 byte smuggling, it
would have to do it the same way as CPython, as it is visible. It's not
impossible (I think), but is messy. Some are strongly against.

It may be worth trying *without* it (i.e. treat "surrogateescape" as
equivalent to "strict" initially), and seeing how you go. The main purpose
of surrogateescape in CPython 3 is to recreate the "arbitrary 8-bit data
round trips work on POSIX" aspect of CPython 2, which doesn't apply in
exactly the same way on Jython.

Compared to the 8-bit vs 16-bit str discrepancy that exists in Python 2,
"surrogateescape is equivalent to strict" seems like a relatively small
discrepancy in behaviour.

Cheers,
Nick.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-13 Thread R. David Murray
On Sat, 13 Sep 2014 21:06:21 +1200, Nick Coghlan  wrote:
> On 13 Sep 2014 10:18, "Jeff Allen"  wrote:
> > 4. I think (with Antoine) if Jython supported PEP-383 byte smuggling, it
> would have to do it the same way as CPython, as it is visible. It's not
> impossible (I think), but is messy. Some are strongly against.
> 
> It may be worth trying *without* it (i.e. treat "surrogateescape" as
> equivalent to "strict" initially), and seeing how you go. The main purpose
> of surrogateescape in CPython 3 is to recreate the "arbitrary 8-bit data
> round trips work on POSIX" aspect of CPython 2, which doesn't apply in
> exactly the same way on Jython.
> 
> Compared to the 8-bit vs 16-bit str discrepancy that exists in Python 2,
> "surrogateescape is equivalent to strict" seems like a relatively small
> discrepancy in behaviour.

That would totally break the email package.

It would of course be possible to rewrite email to not use surrogate
escape, but it is a seriously non-trivial undertaking.

--David
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-13 Thread Tim Lesher
On Sat, Sep 13, 2014, 09:33 R. David Murray  wrote:

> On Sat, 13 Sep 2014 21:06:21 +1200, Nick Coghlan 
> wrote:
> > On 13 Sep 2014 10:18, "Jeff Allen"  wrote:
> > > 4. I think (with Antoine) if Jython supported PEP-383 byte smuggling,
> it
> > would have to do it the same way as CPython, as it is visible. It's not
> > impossible (I think), but is messy. Some are strongly against.
> >
> > It may be worth trying *without* it (i.e. treat "surrogateescape" as
> > equivalent to "strict" initially), and seeing how you go. The main
> purpose
> > of surrogateescape in CPython 3 is to recreate the "arbitrary 8-bit data
> > round trips work on POSIX" aspect of CPython 2, which doesn't apply in
> > exactly the same way on Jython.
> >
> > Compared to the 8-bit vs 16-bit str discrepancy that exists in Python 2,
> > "surrogateescape is equivalent to strict" seems like a relatively small
> > discrepancy in behaviour.
>
> That would totally break the email package.
>
> It would of course be possible to rewrite email to not use surrogate
> escape, but it is a seriously non-trivial undertaking.
>
> --David
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> tlesher%40gmail.com
>
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-13 Thread Nick Coghlan
On 14 Sep 2014 01:33, "R. David Murray"  wrote:
>
> On Sat, 13 Sep 2014 21:06:21 +1200, Nick Coghlan 
wrote:
> > On 13 Sep 2014 10:18, "Jeff Allen"  wrote:
> > > 4. I think (with Antoine) if Jython supported PEP-383 byte smuggling,
it
> > would have to do it the same way as CPython, as it is visible. It's not
> > impossible (I think), but is messy. Some are strongly against.
> >
> > It may be worth trying *without* it (i.e. treat "surrogateescape" as
> > equivalent to "strict" initially), and seeing how you go. The main
purpose
> > of surrogateescape in CPython 3 is to recreate the "arbitrary 8-bit data
> > round trips work on POSIX" aspect of CPython 2, which doesn't apply in
> > exactly the same way on Jython.
> >
> > Compared to the 8-bit vs 16-bit str discrepancy that exists in Python 2,
> > "surrogateescape is equivalent to strict" seems like a relatively small
> > discrepancy in behaviour.
>
> That would totally break the email package.
>
> It would of course be possible to rewrite email to not use surrogate
> escape, but it is a seriously non-trivial undertaking.

That does indeed make for a compelling use case :)

Cheers,
Nick.

>
> --David
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com