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.

Author mgiuca
Recipients LambertDW, ajaksu2, benjamin.peterson, docs@python, eric.araujo, georg.brandl, loewis, mgiuca, pitrou, terry.reedy
Date 2011-07-13.03:57:47
SpamBayes Score 2.5757174e-14
Marked as misclassified No
Message-id <1310529468.41.0.222174114219.issue3565@psf.upfronthosting.co.za>
In-reply-to
Content
There are still some inconsistencies in the documentation (in particular, incorrectly using the word "string" to refer to a bytes object, which made sense in Python 2 but not 3), which I fixed in my doc-only.patch file that's coming up to its third birthday.

Most of it has been fixed with the previous change which added 'tobytes' and 'frombytes' and made tostring and fromstring aliases. But there are some places which don't make sense:

array: "If given a list or string" needs to be "If given a list, bytes or string" (since a bytes is not a string).
frombytes: "Appends items from the string" needs to be "Appends items from the bytes object", since this does not work if you give it a string.

Less importantly, I also recommended renaming "unicode string" to just "string", since in Python 3 there is no such thing as a non-unicode string. For instance, there is an example that uses a variable named "unicodestring" that could be renamed to just "string".

> Indeed, not only it would bring little benefit, but may also confuse
> users porting from 2.x (since the from/tostring methods would then
> have a totally different meaning).
Well, by that logic, you shouldn't have renamed "unicode" to "str" since that would also confuse users porting from 2.x. It generally seems like a good idea in Python 3 to rename all mentions of "string" to "bytes" and all mentions of "unicode" to "string", so as to be consistent with the new names of the types (it is better to be internally consistent than consistent with the previous version).

Though I do agree that it would be chaos to rename array.from/tounicode to from/tostring now, given that array.from/tostring already has a different meaning in Python 3.
History
Date User Action Args
2011-07-13 03:57:48mgiucasetrecipients: + mgiuca, loewis, georg.brandl, terry.reedy, pitrou, ajaksu2, benjamin.peterson, LambertDW, eric.araujo, docs@python
2011-07-13 03:57:48mgiucasetmessageid: <1310529468.41.0.222174114219.issue3565@psf.upfronthosting.co.za>
2011-07-13 03:57:47mgiucalinkissue3565 messages
2011-07-13 03:57:47mgiucacreate