Message190359
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(). |
|
Date |
User |
Action |
Args |
2013-05-30 13:59:21 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2013-05-30 13:59:21 | serhiy.storchaka | set | messageid: <1369922361.42.0.622055843561.issue18101@psf.upfronthosting.co.za> |
2013-05-30 13:59:21 | serhiy.storchaka | link | issue18101 messages |
2013-05-30 13:59:21 | serhiy.storchaka | create | |
|