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

Antoine Pitrou solipsis at pitrou.net
Fri Jul 20 23:27:10 CEST 2012


On Fri, 20 Jul 2012 14:18:20 -0700
Ethan Furman <ethan at stoneleaf.us> wrote:

> Georg Brandl wrote:
> > On 07/18/2012 09:32 PM, Ethan Furman wrote:
> >> Masklinn wrote:
> >>> On 2012-07-18, at 20:06 , Devin Jeanpierre wrote:
> >>>> On Wed, Jul 18, 2012 at 1:58 PM, Masklinn <masklinn at masklinn.net> wrote:
> >>>>> A Python string, you may want to note, is a string. Not a sequence of
> >>>>> characters.
>  >>>>
> >>>> It's both (with the caveat that, in Python, a character is just a
> >>>> string of length 1).
>  >>>
> >>> That's playing with words, especially comparing strings with Python 3
> >>> binaries which *do* actually have a separate "character" type
> >>> (reified to an integer).
>  >>
> >> Python 3 does not have a 'character' type; it has 'str' which is made up 
> >> of more 'str's, and it has 'byte' which is made up of 'int's (annoyingly).
> > 
> > That's what he said.  Could we stop the annoying "but I know it better
> > than you without reading your message" please?
> 
> I am having trouble equating what I said with with Masklinn said. 
> Perhaps you could explain how they say the same thing instead of 
> assuming I didn't read his message?

"Python 3 binaries" probably means "Python 3 bytes objects" above.

Regards

Antoine.


-- 
Software development and contracting: http://pro.pitrou.net





More information about the Python-ideas mailing list