does raw_input() return unicode?

Fredrik Lundh fredrik at pythonware.com
Tue Oct 10 04:20:18 EDT 2006


Theerasak Photha wrote:

>>> So, does raw_input() ever return unicode objects and if
>>> so, under what conditions?
 >>
>> At the moment, it only returns unicode objects when invoked
>> in the IDLE shell, and only if the character entered cannot
>> be represented in the locale's charset.
> 
> Why only IDLE? Does urwid or another console UI toolkit avoid this somehow?

Martin was probably thinking of the standard distribution.

The 2.3 note says that "raw_input() *can* return Unicode", not that it 
"should" or "must" do it.

</F>




More information about the Python-list mailing list