1.1 --- a/lib/builtins.py Sun Apr 06 02:53:43 2008 +0200
1.2 +++ b/lib/builtins.py Sun Apr 06 03:04:36 2008 +0200
1.3 @@ -271,8 +271,8 @@
1.4
1.5 True = bool()
1.6 False = bool()
1.7 -None = none()
1.8 -Ellipsis = ellipsis()
1.9 +None = NoneType()
1.10 +Ellipsis = EllipsisType()
1.11 NotImplemented = NotImplementedType()
1.12
1.13 # General functions.
2.1 --- a/micropython/ast.py Sun Apr 06 02:53:43 2008 +0200
2.2 +++ b/micropython/ast.py Sun Apr 06 03:04:36 2008 +0200
2.3 @@ -240,7 +240,8 @@
2.4 # Where the last operation involves the special 'self' name, check to
2.5 # see if the attribute is acceptably positioned.
2.6
2.7 - elif self.unit.is_method() and isinstance(last, LoadName) and \
2.8 + elif isinstance(self.unit, micropython.inspect.Function) and \
2.9 + self.unit.is_method() and isinstance(last, LoadName) and \
2.10 last.attr.name == "self" and not self.unit.is_relocated(attrname):
2.11
2.12 attr = self.unit.parent.all_attributes()[attrname]
2.13 @@ -488,7 +489,7 @@
2.14 """
2.15
2.16 if self._should_optimise_constant_storage() and cls in (StoreAttr, StoreName) and \
2.17 - self._have_constant_input(n) and self._have_constant_input(n-1):
2.18 + self._have_constant_input(n) and (n == 0 or self._have_constant_input(n-1)):
2.19 self.remove_ops(n+1)
2.20 return 1
2.21 else: