[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread radiocane
radiocane added the comment: >> I'll keep on finding "-> string or unicode" misleading. > How is it misleading when its true? [I promise this is the last reply: I won't waste more of your time] me: How fast does this car go? docstring: 100 km/h or 300 km/h me: ac

[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread radiocane
radiocane added the comment: Given that: 1) No standard codec returns unicode 2) I consider as "most common scenario" the case where a user wants to encode a unicode object using some character encoding and get back an str-like object I'll keep on finding "-> string or u

[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread radiocane
New submission from radiocane : In Python 2.7.15rc1 the docstring for unicode.encode starts with: "S.encode([encoding[,errors]]) -> string or unicode" But if this answer https://stackoverflow.com/a/449281/5397695 is correct, then unicode.encode will never return a unicode objec