Message164440
Did you read "Unfortunately, delimiter is represented by a character in C." in one of the answers? If so, this should be rejected. For the posted problem, I added the following.
>>> list(s[1:-1] for s in '"1234"||"abcd"||"a1s1"'.split('||'))
['1234', 'abcd', 'a1s1']
re.split is intended for general splitting tasks. The SO had other posted solutions that also do the job. So I do not see the need.
Using commas both within quoted fields and between fields is semi-sensible, or at least widely done. Anyway, csv was designed for that and then generalized. I do not see the need to cater to something as foolish and rare as using a multichar delimiter that is also within fields.
I suggest you post enhancement ideas on python-ideas first, as it is a better place for discussion and reaches more people. |
|
Date |
User |
Action |
Args |
2012-07-01 00:45:04 | terry.reedy | set | recipients:
+ terry.reedy, tshepang, Ramchandra Apte |
2012-07-01 00:45:04 | terry.reedy | set | messageid: <1341103504.25.0.473891042739.issue15158@psf.upfronthosting.co.za> |
2012-07-01 00:45:03 | terry.reedy | link | issue15158 messages |
2012-07-01 00:45:03 | terry.reedy | create | |
|