@@ -736,8 +736,10 @@ def __ne__(self, other):
736736 try: return other[1] != self.formID[1] or other[0] != self.formID[0]
737737 except TypeError: return False
738738
739- def __nonzero__ (self):
739+ def __bool__ (self):
740740 return not isinstance(self.formID, (FormID.EmptyFormID, FormID.InvalidFormID))
741+ # PY3 get rid of this once we port
742+ __nonzero__ = __bool__
741743
742744 def __getitem__(self, x):
743745 return self.formID[0] if x == 0 else self.formID[1]
@@ -973,8 +975,10 @@ def __ne__(self, other):
973975 try: return other[1] != self.actorValue[1] or other[0] != self.actorValue[0]
974976 except TypeError: return False
975977
976- def __nonzero__ (self):
978+ def __bool__ (self):
977979 return not isinstance(self.actorValue, (ActorValue.EmptyActorValue, ActorValue.InvalidActorValue))
980+ # PY3 get rid of this once we port
981+ __nonzero__ = __bool__
978982
979983 def __getitem__(self, x):
980984 return self.actorValue[0] if x == 0 else self.actorValue[1]
@@ -1221,8 +1225,10 @@ def __eq__(self, other):
12211225 def __ne__(self, other):
12221226 return other[1] != self.mgefCode[1] or other[0] != self.mgefCode[0]
12231227
1224- def __nonzero__ (self):
1228+ def __bool__ (self):
12251229 return not isinstance(self.mgefCode, (MGEFCode.EmptyMGEFCode, MGEFCode.InvalidMGEFCode))
1230+ # PY3 get rid of this once we port
1231+ __nonzero__ = __bool__
12261232
12271233 def __getitem__(self, x):
12281234 return self.mgefCode[0] if x == 0 else self.mgefCode[1]
0 commit comments