[selectors] explicity fail on inplace and/or
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 14 Aug 2009 09:17:54 +0200
changeset 2833 9aa47a3c0dfe
parent 2832 7fb67c54ffb9
child 2834 7df3494ae657
[selectors] explicity fail on inplace and/or
appobject.py
--- a/appobject.py	Fri Aug 14 09:17:28 2009 +0200
+++ b/appobject.py	Fri Aug 14 09:17:54 2009 +0200
@@ -84,11 +84,15 @@
         return AndSelector(self, other)
     def __rand__(self, other):
         return AndSelector(other, self)
+    def __iand__(self, other):
+        raise NotImplementedError('cant use inplace & (binary and)')
 
     def __or__(self, other):
         return OrSelector(self, other)
     def __ror__(self, other):
         return OrSelector(other, self)
+    def __ior__(self, other):
+        raise NotImplementedError('cant use inplace | (binary or)')
 
     def __invert__(self):
         return NotSelector(self)