[issue1170] shlex have problems with parsing unicode

Fernando Perez report at bugs.python.org
Tue Jul 27 21:02:38 CEST 2010

Fernando Perez <fdo.perez at gmail.com> added the comment:

On Tue, Jul 27, 2010 at 11:52, Alexander Belopolsky
<report at bugs.python.org> wrote:
> Why do you expect shlex to work with unicode in 2.x? =A0The
> documentation clearly says that the argument should be a string.
> Supporting unicode is not an unreasonable RFE, but won't be considered
> for 2.x anymore.

Well, I didn't make the original report, just provided a short,
illustrative example :)  It's easy enough to work around the issue for
2.x that I don't care too much about it, so I have no problem with 2.x
staying as it is.

> What's your take on accepting bytes in 3.x?

Mmh... Not too sure.  I'd think about it from the perspective of what
possible sources of input could produce raw bytes, that would be
reasonable use cases for shlex.  Is it common in 3.x to read a file in
bytes mode?  If so, then it might be a good reason to have shlex parse
bytes as well, since I can imagine reading inputs from files to be
parsed via shlex.

But take my opinion on 3.x with a big grain of salt, I have very
little experience with it as of yet.




Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list