[pypy-svn] r9763 - pypy/dist/pypy/annotation
pedronis at codespeak.net
pedronis at codespeak.net
Mon Mar 14 16:05:30 CET 2005
Author: pedronis
Date: Mon Mar 14 16:05:29 2005
New Revision: 9763
Modified:
pypy/dist/pypy/annotation/binaryop.py
Log:
let mix lists and None for now
Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py (original)
+++ pypy/dist/pypy/annotation/binaryop.py Mon Mar 14 16:05:29 2005
@@ -340,6 +340,18 @@
def union((pbc, ins)):
return pair(ins, pbc).union()
+# let mix lists and None for now
+class __extend__(pairtype(SomeList, SomePBC)):
+ def union((lst, pbc)):
+ if pbc.isNone():
+ return lst
+ return SomeObject()
+
+class __extend__(pairtype(SomePBC, SomeList )):
+ def union((pbc, lst)):
+ return pair(lst, pbc).union()
+
+
class __extend__(pairtype(SomeObject, SomePBC)):
def issubtype((obj, pbc)):
s = SomeBool()
More information about the Pypy-commit
mailing list