Question about expression evaluation

Scott Gould zinckiwi at
Mon Nov 8 17:17:30 CET 2010

Hi folks,

This is a head-scratcher to me. I occasionally get this error:

  File "/var/www/myproj/account/", line 54, in account
    if request.account.is_instructor and and

AttributeError: 'NoneType' object has no attribute 'relationship'

I'm leaving out all the supporting code deliberately. My question is
simple: if python short-circuits evaluation and
"" is None, how is it even getting as far as


More information about the Python-list mailing list