[Python-ideas] '' in 'abc' == True

Devin Jeanpierre jeanpierreda at gmail.com
Sat Jul 21 15:59:05 CEST 2012


On Sat, Jul 21, 2012 at 7:19 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> Andrew Svetlov wrote:
>>
>> Masklinn's explanation is comprehensive clean to me.
>
>
> I'm glad that it's clear to someone, because to me the straight-forward,
> literal meaning of Masklinn's explanation (that Python 3 has a character
> type, and they're integers) is wrong. Python has no built-in "Char" type,
> under any spelling, let alone one which is also a subset of int. The
> non-literal meaning is hard to understand. I *guess* that Masklinn is trying
> to get across that Python 3 strings are Unicode strings, and characters in
> Unicode are actually code points, which are implemented at the C level as
> integers. If not that, I have no idea.

You're pretty far off. He was talking about bytes objects, not str objects.

-- Devin



More information about the Python-ideas mailing list