Hi there!
Recently I submitted such piece of code to one of my projects:
if 'text' in d.get('a'):
# do something
Obviously that was expected to be something like:
if 'text' in d.get('a', ''):
# do something
because .get() might return None, and checking if something is
* Александр Чекунков [2015-08-01 20:13:34 +0300]:
> Hi there!
>
> Recently I submitted such piece of code to one of my projects:
>
> if 'text' in d.get('a'):
> # do something
>
> Obviously that was expected to be something like:
>
> if 'text' in d.get('a', ''):
> # do s