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

Łukasz Ligowski orangewarrior at gmail.com
Thu Oct 30 16:26:27 CET 2008


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 user.  It
> should be something like;
>
>   """dict.has_key(key) is deprecated.  Use "key in dict" instead."""
>
> IOW your explanation of the sentence is better than the sentence.  :-)

I second this ;)

Thanks both of you for explanation.

L




More information about the Python-list mailing list