[New-bugs-announce] [issue18101] Tk.split() doesn't work with nested Unicode strings
Serhiy Storchaka
report at bugs.python.org
Thu May 30 15:59:21 CEST 2013
New submission from Serhiy Storchaka:
Tk.split() doesn't work with nested Unicode strings, but works with nested bytes.
>>> import tkinter
>>> t = tkinter.Tcl()
>>> t.split('a {b c}')
('a', ('b', 'c'))
>>> t.split(b'a {b c}')
('a', ('b', 'c'))
>>> t.split(('a {b c}',))
('a {b c}',)
>>> t.split((b'a {b c}',))
(('a', ('b', 'c')),)
I think this is unintentional. Here is a patch which processes strings inside a tuple as bytes objects. It also adds tests for Tk.splitline() and Tk.split().
----------
components: Tkinter
files: tkinter_split_nested_unicode.patch
keywords: patch
messages: 190359
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Tk.split() doesn't work with nested Unicode strings
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30426/tkinter_split_nested_unicode.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18101>
_______________________________________
More information about the New-bugs-announce
mailing list