[bind10-dev] Python style micro-nit

zhanglikun zlkzhy at gmail.com
Wed Jun 30 03:08:58 UTC 2010


> In Python you can say:
> 
>     if foo is not None:
>         do_something()
>     if bar not in baz:
>         do_something_else()
> 
> You can also say:
> 
>     if not foo is None:
>         do_something()
>     if not bar in baz:
>         do_something_else()

If using the latter way, can we add the parents to make it more readable?
Like:

     if not (foo is None):
         do_something()
     if not ( bar in baz):
         do_something_else()

Likun





More information about the bind10-dev mailing list