allpy
changeset 628:61de9b5744c8
Monomer.== now allows comparison with None
author | Daniil Alexeyevsky <dendik@kodomo.fbb.msu.ru> |
---|---|
date | Wed, 18 May 2011 21:38:17 +0400 |
parents | 9c3dea94cb76 |
children | 62a110b17a36 |
files | allpy/base.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/allpy/base.py Mon May 16 20:40:58 2011 +0400 1.2 +++ b/allpy/base.py Wed May 18 21:38:17 2011 +0400 1.3 @@ -80,6 +80,8 @@ 1.4 1.5 def __eq__(self, other): 1.6 """Monomers within same monomer type are compared by code1.""" 1.7 + if not other: 1.8 + return False 1.9 assert self.type == other.type 1.10 return self.code1 == other.code1 1.11