On Sun, 20 Aug 2006, Neil Schemenauer wrote:

> John J Lee <[EMAIL PROTECTED]> wrote:
>> The note (4) says that the result will be unicode, but it doesn't say how,
>> in this case, that comes about.  This case is confusing because the docs
>> claim string formatting with %s "converts ... using str()", and yet
>> str(a()) returns a bytestring.  Does it *really* use str, or just __str__?
>> Surely the latter? (given the observed behaviour, and not reading the C
>> source)
>
> It uses __str__ and confirms that the returned object is a 'str' or
> 'unicode'.  The docs are not precise but they were not for 2.4
> either.  Note the following case:
[...]

OK, but I assume you're not saying that the fact that the docs were broken 
in 2.4 implies they shouldn't be fixed now?

I would suggest revised wording, but I'm clearly confused about what 
actually goes on under the hood...


John

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to