Re: python3 byte decode

2017-11-07 Thread Chris Angelico
On Wed, Nov 8, 2017 at 4:36 PM, Ali Rıza KELEŞ wrote: >> To be more clear here, usually when humans say "identical" they mean having >> exactly the same value or attributes. >> Here, Chris means that the two strings are actually the same object rather >> than two equivalent objects. "is" tests the

Re: python3 byte decode

2017-11-07 Thread Ali Rıza KELEŞ
Hi, On 5 November 2017 at 04:06, Cameron Simpson wrote: > On 04Nov2017 01:47, Chris Angelico wrote: >> >> On Fri, Nov 3, 2017 at 8:24 PM, Ali Rıza KELEŞ >> wrote: >>> >>> Yesterday, while working with redis, i encountered a strange case. >>> >>> I want to ask why is the following `True` >>> >>>

Re: python3 byte decode

2017-11-04 Thread Cameron Simpson
On 04Nov2017 01:47, Chris Angelico wrote: On Fri, Nov 3, 2017 at 8:24 PM, Ali Rıza KELEŞ wrote: Yesterday, while working with redis, i encountered a strange case. I want to ask why is the following `True` ``` "s" is b"s".decode() ``` while the followings are `False`? ``` "so" is b"so".deco

Re: python3 byte decode

2017-11-03 Thread Terry Reedy
On 11/3/2017 5:24 AM, Ali Rıza KELEŞ wrote: Hi, Yesterday, while working with redis, i encountered a strange case. I want to ask why is the following `True` ``` "s" is b"s".decode() ``` while the followings are `False`? ``` "so" is b"so".decode() "som" is b"som".decode() "some" is b"some".de

Re: python3 byte decode

2017-11-03 Thread Chris Angelico
On Fri, Nov 3, 2017 at 8:24 PM, Ali Rıza KELEŞ wrote: > Hi, > > Yesterday, while working with redis, i encountered a strange case. > > I want to ask why is the following `True` > > ``` > "s" is b"s".decode() > ``` > > while the followings are `False`? > > ``` > "so" is b"so".decode() > "som" is b"