1.1 --- a/micropython/table.py Tue Jul 10 01:36:34 2012 +0200
1.2 +++ b/micropython/table.py Tue Jul 10 18:54:33 2012 +0200
1.3 @@ -124,8 +124,8 @@
1.4 break
1.5 element = self.displaced[i + offset]
1.6 if attr is not None and element is not None:
1.7 - return 0
1.8 - return 1
1.9 + return False
1.10 + return True
1.11
1.12 def _add_row(self, offset, attributes, len_displaced):
1.13
1.14 @@ -312,10 +312,10 @@
1.15
1.16 possible = []
1.17 for objname, attributes in self.table.items():
1.18 - found = 1
1.19 + found = True
1.20 for name in names:
1.21 if not attributes.has_key(name):
1.22 - found = 0
1.23 + found = False
1.24 break
1.25 if found:
1.26 possible.append(objname)
1.27 @@ -332,10 +332,10 @@
1.28
1.29 possible = []
1.30 for objname, attributes in self.table.items():
1.31 - found = 0
1.32 + found = False
1.33 for name in names:
1.34 if attributes.has_key(name):
1.35 - found = 1
1.36 + found = True
1.37 break
1.38 if found:
1.39 possible.append(objname)
1.40 @@ -398,8 +398,8 @@
1.41 for objname in fn(names):
1.42 attributes = self.table[objname]
1.43
1.44 - is_static = 0
1.45 - is_instance = 0
1.46 + is_static = False
1.47 + is_instance = False
1.48
1.49 for name in names:
1.50 if not attributes.has_key(name):
1.51 @@ -409,14 +409,14 @@
1.52 if isinstance(attr, (Class, Module)):
1.53 pass
1.54 elif attr.is_static_attribute():
1.55 - is_static = 1
1.56 + is_static = True
1.57 else:
1.58 - is_instance = 1
1.59 + is_instance = True
1.60
1.61 if is_static and not is_instance:
1.62 - is_static = 1
1.63 + is_static = True
1.64 else:
1.65 - is_static = 0
1.66 + is_static = False
1.67
1.68 possible.append((objname, is_static))
1.69