Re: "xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread Ben Finney
Łukasz Ligowski <[EMAIL PROTECTED]> writes: > 2.5 docs say that: > "a.has_key(k) Equivalent to k in a, use that form in new code" > > 2.6 docs say that: > "dict.has_key(key) is equivalent to key in d, but deprecated." > > which is true? Both are true, and are different ways of saying the same

Re: "xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread Terry Reedy
D'Arcy J.M. Cain wrote: On Thu, 30 Oct 2008 09:50:57 -0500 "Kurt Smith" <[EMAIL PROTECTED]> wrote: 2.5 docs say that: "a.has_key(k) Equivalent to k in a, use that form in new code" Meaning: don't use 'a.has_key(k)'. 2.6 docs say that: "dict.has_key(key) is equivalent to key in d, but deprec

Re: "xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread Łukasz Ligowski
Hi, On Thursday 30 of October 2008 16:11:07 you wrote: > On Thu, 30 Oct 2008 09:50:57 -0500 > > Wow! That is so badly written. Both those statements could easily be > read the opposite by someone reading the docs. Granted the latter is > better and it is correct but it could be clearer the the

Re: "xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread D'Arcy J.M. Cain
On Thu, 30 Oct 2008 09:50:57 -0500 "Kurt Smith" <[EMAIL PROTECTED]> wrote: > > 2.5 docs say that: > > "a.has_key(k) Equivalent to k in a, use that form in new code" > > Meaning: don't use 'a.has_key(k)'. > > > 2.6 docs say that: > > "dict.has_key(key) is equivalent to key in d, but deprecated."

Re: "xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread Kurt Smith
On Thu, Oct 30, 2008 at 9:37 AM, Łukasz Ligowski <[EMAIL PROTECTED]>wrote: > Hi, > > There is small inconsistency (or I don't understand it right) between > python > 2.5 docs and python 2.6 docs. > > 2.5 docs say that: > "a.has_key(k) Equivalent to k in a, use that form in new code" Meaning: do

Re: "xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread Terry Reedy
Łukasz Ligowski wrote: Hi, There is small inconsistency (or I don't understand it right) between python 2.5 docs and python 2.6 docs. 2.5 docs say that: "a.has_key(k) Equivalent to k in a, use that form in new code" 2.6 docs say that: "dict.has_key(key) is equivalent to key in d, but depre

"xxx.has_key(a)" vs "a in xxx"

2008-10-30 Thread Łukasz Ligowski
Hi, There is small inconsistency (or I don't understand it right) between python 2.5 docs and python 2.6 docs. 2.5 docs say that: "a.has_key(k) Equivalent to k in a, use that form in new code" 2.6 docs say that: "dict.has_key(key) is equivalent to key in d, but deprecated." which is true?