This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年12月15日 08:29 by sjmachin, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg77849 - (view) | Author: John Machin (sjmachin) | Date: 2008年12月15日 08:29 | |
These methods are parallel to str.join, seem to work as expected, and have "help" entries. However there is nothing in the Library Reference Manual about them. >>> help(bytearray.join) Help on method_descriptor: join(...) B.join(iterable_of_bytes) -> bytearray Concatenate any number of bytes/bytearray objects, with B in between each pair, and return the result as a new bytearray. ### OK but could use an example. >>> help(bytes.join) Help on method_descriptor: join(...) B.join(iterable_of_bytes) -> bytes Concatenate any number of bytes objects, with B in between each pair. ### Above sentence should read "Concatenate any number of bytes/bytearray objects, with B in between each pair, and return the result as a new bytes object." Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'. |
|||
| msg78081 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2008年12月20日 03:06 | |
I am puzzled as to what you think is missing in the manual. "Bytes and Byte Array Methods 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. ... Note The methods on bytes and bytearray objects don’t accept strings as their arguments, just as the methods on strings don’t accept bytes as their arguments. For example, " I believe you are right that bytes => bytes/bytearray in the second help entry. |
|||
| msg78084 - (view) | Author: John Machin (sjmachin) | Date: 2008年12月20日 04:07 | |
Terry, you are right. I missed that. My report was based on looking via the index and finding only "(str method)", no "(byte[sarray] method)". |
|||
| msg78383 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2008年12月27日 19:13 | |
Closing as "works for me". |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:42 | admin | set | github: 48919 |
| 2008年12月27日 19:13:01 | georg.brandl | set | status: open -> closed resolution: works for me messages: + msg78383 |
| 2008年12月20日 04:07:31 | sjmachin | set | messages: + msg78084 |
| 2008年12月20日 03:06:26 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg78081 |
| 2008年12月15日 08:29:43 | sjmachin | create | |