python  判空常用 XX is not None,但其实 not  XX is None 也可以。

http://stackoverflow.com/questions/2710940/python-if-x-is-not-none-or-if-not-x-is-none