[issue27092] ord() raises TypeError on string/bytes input

2016-05-23 Thread Christoph Wruck
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

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Christoph Wruck
Changes by Christoph Wruck : -- type: enhancement -> behavior ___ Python tracker <http://bugs.python.org/issue27092> ___ ___ Python-bugs-list mailing list Un

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Christoph Wruck
Changes by Christoph Wruck : -- type: -> enhancement ___ Python tracker <http://bugs.python.org/issue27092> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Christoph Wruck
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

[issue22360] Adding manually offset parameter to str/bytes split function

2014-09-08 Thread Christoph Wruck
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

[issue22360] Adding manually offset parameter to str/bytes split function

2014-09-08 Thread Christoph Wruck
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

[issue22360] Adding manually offset parameter to str/bytes split function

2014-09-08 Thread Christoph Wruck
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

[issue22360] Adding manually offset parameter to str/bytes split function

2014-09-08 Thread Christoph Wruck
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