[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-10 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58093. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-08 Thread Guido van Rossum
Changes by Guido van Rossum: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/py

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-08 Thread Guido van Rossum
Changes by Guido van Rossum: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/py

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: New version with corrected docstrings and buffer support for *split() as well. Added unittests. __ Tracker <[EMAIL PROTECTED]> __Index: Objects/bytesobject.c ==

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: Updated patch that also modifies bytes.*strip(). __ Tracker <[EMAIL PROTECTED]> __Index: Objects/bytesobject.c ==

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-08 Thread Stefan Sonnenberg-Carstens
Stefan Sonnenberg-Carstens added the comment: IMHO I also aggree that strings and bytes (list of bytes) should have the same interface. It is common sense that talking about strings most programmers think of a list of bytes composing it (char *). So the abbreviation should also hold true with pyt

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Guido van Rossum
Changes by Guido van Rossum: -- components: +Interpreter Core -Library (Lib) type: rfe -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___ Python-

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a patch that fixes bytes.split and .rsplit. I'll hold off for a while in case there's strong disagreement. I might add a patch for bytes.strip later (it's simpler). -- keywords: +patch __ Tracker <[EMAIL PROTEC

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Guido van Rossum
Changes by Guido van Rossum: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/py

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Guido van Rossum
Guido van Rossum added the comment: I tend to agree with the author; I've run into this myself. For whitespace, I propose to use only the following: tab LF FF VT CR space. These are the whitespace ASCII characters according to isspace() in libc. (Unicode also treats hex 1C, 1D, 1E and 1F as whit

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Walter Dörwald
Walter Dörwald added the comment: Because it's not clear whether b'\xa0' *is* whitespace or not. Bytes have no meaning, characters do. -- nosy: +doerwalter __ Tracker <[EMAIL PROTECTED]> _

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Nir Soffer
Nir Soffer added the comment: Why bytes should not use a default whitespace split behavior as str? __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-06 Thread Georg Brandl
Georg Brandl added the comment: I don't think so. They can't have the same behavior, and "split" is the most reasonable name for what the bytes method does. There have always been subtle differences between the behavior of string and unicode methods; this was even more objectable because they we

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-06 Thread Nir Soffer
Nir Soffer added the comment: set type -- type: -> rfe __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-06 Thread Nir Soffer
New submission from Nir Soffer: >>> b'foo bar'.split() Traceback (most recent call last): File "", line 1, in TypeError: split() takes at least 1 argument (0 given) >>> b'foo bar'.split(None) Traceback (most recent call last): File "", line 1, in TypeError: expected an object with the bu