1.1 --- a/micropython/ast.py Sat Aug 23 21:57:29 2008 +0200
1.2 +++ b/micropython/ast.py Sat Aug 23 22:32:17 2008 +0200
1.3 @@ -498,7 +498,7 @@
1.4 """
1.5
1.6 if self._should_optimise_known_target() and self._have_known_target():
1.7 - last = self.last_op()
1.8 + last = self.active_value
1.9 target = last.attr.value
1.10 context = last.attr.context
1.11
1.12 @@ -1249,7 +1249,6 @@
1.13
1.14 end_attempt_label = self.new_label()
1.15
1.16 - self._startCallFunc()
1.17 self.new_op(temp1)
1.18
1.19 # Get method on temp1.
1.20 @@ -1262,6 +1261,7 @@
1.21 # Add arguments.
1.22 # NOTE: No support for defaults.
1.23
1.24 + self._startCallFunc()
1.25 self.new_op(temp1)
1.26 self.new_op(StoreFrame(0))
1.27 self.new_op(temp2)
1.28 @@ -1280,7 +1280,6 @@
1.29 # End method attempt.
1.30
1.31 self.set_label(end_attempt_label)
1.32 - self._endCallFunc(load_result=0) # From the method call.
1.33
1.34 def _handleAttributeError(self, node, end_call_label):
1.35
2.1 --- a/tests/compare.py Sat Aug 23 21:57:29 2008 +0200
2.2 +++ b/tests/compare.py Sat Aug 23 22:32:17 2008 +0200
2.3 @@ -4,16 +4,6 @@
2.4 b = 2
2.5 c = 3
2.6
2.7 -class X:
2.8 - def __contains__(self, other):
2.9 - return 1
2.10 -
2.11 a < b < c
2.12
2.13 -x = X()
2.14 -
2.15 -a == x != b
2.16 -a is x is not b
2.17 -a in x
2.18 -
2.19 # vim: tabstop=4 expandtab shiftwidth=4
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/compare2.py Sat Aug 23 22:32:17 2008 +0200
3.3 @@ -0,0 +1,17 @@
3.4 +#!/usr/bin/env python
3.5 +
3.6 +a = 1
3.7 +b = 2
3.8 +c = 3
3.9 +
3.10 +class X:
3.11 + def __contains__(self, other):
3.12 + return 1
3.13 +
3.14 +x = X()
3.15 +
3.16 +a == x != b
3.17 +a is x is not b
3.18 +a in x
3.19 +
3.20 +# vim: tabstop=4 expandtab shiftwidth=4