New submission from Christoph Wruck:
Currently we have a "split" function which splits a str/bytestr into
chunks of their underlying data. This works great for the most tivial jobs.
But there is no possibility to pass an offset parameter into the split
function which indicates the
Christoph Wruck added the comment:
Hi Steven
exactly - you're right with this.
'spam--eggs--cheesetoast'.split('-', offset=1)
--> ['spam', '-eggs', '-cheese', '-', '-toast']
'spam--eggs--cheese--toast
Christoph Wruck added the comment:
Serhiy, you will be right if you've to split a complex string such spliting
strings with more than one separator. In this case I would prefer a regex bases
solution too. Otherwise we could actually use the re-lib for every of those
jobs without usin
Christoph Wruck added the comment:
David, I'll reflect on it. @ALL - Thank's for all answers.
Should I close this ticket?
--
___
Python tracker
<http://bugs.python.o
New submission from Christoph Wruck:
Hi,
is there any reason why ord() raises a TypeError instead of ValueError on
string/bytes input with wrong length?
The chr() function will raise a ValueError on negative integers such as chr(-1).
Required behaviour:
try:
n = ord(input_string)
except
Changes by Christoph Wruck :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue27092>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Christoph Wruck :
--
type: enhancement -> behavior
___
Python tracker
<http://bugs.python.org/issue27092>
___
___
Python-bugs-list mailing list
Un
Christoph Wruck added the comment:
closed as redundant to:
http://bugs.python.org/issue27008
--
resolution: -> not a bug
status: open -> closed
title: ord() raises TypeError in string input -> ord() raises TypeError on
string/by