Xuanji Li <xua...@gmail.com> added the comment:

Hi, it seems to me that section 4.6.5. Bytes and Byte Array Methods covers this 
already. It says:

Bytes and bytearray objects, being “strings of bytes”, have all methods found 
on strings, with the exception of encode(), format() and isidentifier(), which 
do not make sense with these types. For converting the objects to strings, they 
have a decode() method.

Wherever one of these methods needs to interpret the bytes as characters (e.g. 
the is...() methods), the ASCII character set is assumed.

This section covers belpolsky's needs, ie a reader can, from this, understand 
that bytes have a capitalize method. However, I support

1) Expanding this section to explain more clearly what the methods do to bytes
2) Discuss unicode vs bytes details
3) Mention bytes and bytearrays in 4.6.1 String Methods, because it is quite 
far away from 4.6.5

As for the suggestion of renaming, if we rename the section, we have to decide 
what to call a string/byte/bytearray object because it now says, for example, 
str.something(); also we have to document the encode and decode methods 
seperately because they are not common to strings and bytes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10702>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to