Guido van Rossum added the comment:
Committed revision 58093.
--
resolution: - accepted
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
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
Guido van Rossum added the comment:
Updated patch that also modifies bytes.*strip().
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__Index: Objects/bytesobject.c
Guido van Rossum added the comment:
New version with corrected docstrings and buffer support for *split() as
well. Added unittests.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__Index: Objects/bytesobject.c
Changes by Guido van Rossum:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Guido van Rossum:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
___
Python-bugs-list mailing list
Unsubscribe:
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
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]
http://bugs.python.org/issue1125
__
Nir Soffer added the comment:
Why bytes should not use a default whitespace split behavior as str?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
___
Python-bugs-list
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
Changes by Guido van Rossum:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Guido van Rossum:
--
components: +Interpreter Core -Library (Lib)
type: rfe - behavior
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
___
New submission from Nir Soffer:
b'foo bar'.split()
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: split() takes at least 1 argument (0 given)
b'foo bar'.split(None)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: expected an
Nir Soffer added the comment:
set type
--
type: - rfe
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1125
__
___
Python-bugs-list mailing list
Unsubscribe:
15 matches
Mail list logo