Message190359
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka |
| Date |
2013年05月30日.13:59:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1369922361.42.0.622055843561.issue18101@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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(). |
|
History
|
|---|
| 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 |
|