@@ -42,6 +42,12 @@ def __xor__(self, other):
42
42
def __or__ (self , other ):
43
43
return self ._binary_op (other , operator .or_ )
44
44
45
+ def __lshift__ (self , other ):
46
+ return self ._binary_op (other , operator .lshift )
47
+
48
+ def __rshift__ (self , other ):
49
+ return self ._binary_op (other , operator .rshift )
50
+
45
51
def __lt__ (self , other ):
46
52
return self ._binary_op (other , operator .lt )
47
53
@@ -123,6 +129,12 @@ def __ixor__(self, other):
123
129
def __ior__ (self , other ):
124
130
return self ._inplace_binary_op (other , operator .ior )
125
131
132
+ def __ilshift__ (self , other ):
133
+ return self ._inplace_binary_op (other , operator .ilshift )
134
+
135
+ def __irshift__ (self , other ):
136
+ return self ._inplace_binary_op (other , operator .irshift )
137
+
126
138
def _unary_op (self , f , * args , ** kwargs ):
127
139
raise NotImplementedError
128
140
@@ -160,6 +172,8 @@ def conjugate(self, *args, **kwargs):
160
172
__and__ .__doc__ = operator .and_ .__doc__
161
173
__xor__ .__doc__ = operator .xor .__doc__
162
174
__or__ .__doc__ = operator .or_ .__doc__
175
+ __lshift__ .__doc__ = operator .lshift .__doc__
176
+ __rshift__ .__doc__ = operator .rshift .__doc__
163
177
__lt__ .__doc__ = operator .lt .__doc__
164
178
__le__ .__doc__ = operator .le .__doc__
165
179
__gt__ .__doc__ = operator .gt .__doc__
@@ -186,6 +200,8 @@ def conjugate(self, *args, **kwargs):
186
200
__iand__ .__doc__ = operator .iand .__doc__
187
201
__ixor__ .__doc__ = operator .ixor .__doc__
188
202
__ior__ .__doc__ = operator .ior .__doc__
203
+ __ilshift__ .__doc__ = operator .ilshift .__doc__
204
+ __irshift__ .__doc__ = operator .irshift .__doc__
189
205
__neg__ .__doc__ = operator .neg .__doc__
190
206
__pos__ .__doc__ = operator .pos .__doc__
191
207
__abs__ .__doc__ = operator .abs .__doc__
@@ -232,6 +248,12 @@ def __xor__(self, other):
232
248
def __or__ (self , other ):
233
249
return self ._binary_op (other , operator .or_ )
234
250
251
+ def __lshift__ (self , other ):
252
+ return self ._binary_op (other , operator .lshift )
253
+
254
+ def __rshift__ (self , other ):
255
+ return self ._binary_op (other , operator .rshift )
256
+
235
257
def __lt__ (self , other ):
236
258
return self ._binary_op (other , operator .lt )
237
259
@@ -313,6 +335,12 @@ def __ixor__(self, other):
313
335
def __ior__ (self , other ):
314
336
return self ._inplace_binary_op (other , operator .ior )
315
337
338
+ def __ilshift__ (self , other ):
339
+ return self ._inplace_binary_op (other , operator .ilshift )
340
+
341
+ def __irshift__ (self , other ):
342
+ return self ._inplace_binary_op (other , operator .irshift )
343
+
316
344
def _unary_op (self , f , * args , ** kwargs ):
317
345
raise NotImplementedError
318
346
@@ -350,6 +378,8 @@ def conjugate(self, *args, **kwargs):
350
378
__and__ .__doc__ = operator .and_ .__doc__
351
379
__xor__ .__doc__ = operator .xor .__doc__
352
380
__or__ .__doc__ = operator .or_ .__doc__
381
+ __lshift__ .__doc__ = operator .lshift .__doc__
382
+ __rshift__ .__doc__ = operator .rshift .__doc__
353
383
__lt__ .__doc__ = operator .lt .__doc__
354
384
__le__ .__doc__ = operator .le .__doc__
355
385
__gt__ .__doc__ = operator .gt .__doc__
@@ -376,6 +406,8 @@ def conjugate(self, *args, **kwargs):
376
406
__iand__ .__doc__ = operator .iand .__doc__
377
407
__ixor__ .__doc__ = operator .ixor .__doc__
378
408
__ior__ .__doc__ = operator .ior .__doc__
409
+ __ilshift__ .__doc__ = operator .ilshift .__doc__
410
+ __irshift__ .__doc__ = operator .irshift .__doc__
379
411
__neg__ .__doc__ = operator .neg .__doc__
380
412
__pos__ .__doc__ = operator .pos .__doc__
381
413
__abs__ .__doc__ = operator .abs .__doc__
@@ -422,6 +454,12 @@ def __xor__(self, other):
422
454
def __or__ (self , other ):
423
455
return self ._binary_op (other , operator .or_ )
424
456
457
+ def __lshift__ (self , other ):
458
+ return self ._binary_op (other , operator .lshift )
459
+
460
+ def __rshift__ (self , other ):
461
+ return self ._binary_op (other , operator .rshift )
462
+
425
463
def __lt__ (self , other ):
426
464
return self ._binary_op (other , operator .lt )
427
465
@@ -503,6 +541,12 @@ def __ixor__(self, other):
503
541
def __ior__ (self , other ):
504
542
return self ._inplace_binary_op (other , operator .ior )
505
543
544
+ def __ilshift__ (self , other ):
545
+ return self ._inplace_binary_op (other , operator .ilshift )
546
+
547
+ def __irshift__ (self , other ):
548
+ return self ._inplace_binary_op (other , operator .irshift )
549
+
506
550
def _unary_op (self , f , * args , ** kwargs ):
507
551
raise NotImplementedError
508
552
@@ -540,6 +584,8 @@ def conjugate(self, *args, **kwargs):
540
584
__and__ .__doc__ = operator .and_ .__doc__
541
585
__xor__ .__doc__ = operator .xor .__doc__
542
586
__or__ .__doc__ = operator .or_ .__doc__
587
+ __lshift__ .__doc__ = operator .lshift .__doc__
588
+ __rshift__ .__doc__ = operator .rshift .__doc__
543
589
__lt__ .__doc__ = operator .lt .__doc__
544
590
__le__ .__doc__ = operator .le .__doc__
545
591
__gt__ .__doc__ = operator .gt .__doc__
@@ -566,6 +612,8 @@ def conjugate(self, *args, **kwargs):
566
612
__iand__ .__doc__ = operator .iand .__doc__
567
613
__ixor__ .__doc__ = operator .ixor .__doc__
568
614
__ior__ .__doc__ = operator .ior .__doc__
615
+ __ilshift__ .__doc__ = operator .ilshift .__doc__
616
+ __irshift__ .__doc__ = operator .irshift .__doc__
569
617
__neg__ .__doc__ = operator .neg .__doc__
570
618
__pos__ .__doc__ = operator .pos .__doc__
571
619
__abs__ .__doc__ = operator .abs .__doc__
@@ -612,6 +660,12 @@ def __xor__(self, other):
612
660
def __or__ (self , other ):
613
661
return self ._binary_op (other , operator .or_ )
614
662
663
+ def __lshift__ (self , other ):
664
+ return self ._binary_op (other , operator .lshift )
665
+
666
+ def __rshift__ (self , other ):
667
+ return self ._binary_op (other , operator .rshift )
668
+
615
669
def __lt__ (self , other ):
616
670
return self ._binary_op (other , operator .lt )
617
671
@@ -670,6 +724,8 @@ def __ror__(self, other):
670
724
__and__ .__doc__ = operator .and_ .__doc__
671
725
__xor__ .__doc__ = operator .xor .__doc__
672
726
__or__ .__doc__ = operator .or_ .__doc__
727
+ __lshift__ .__doc__ = operator .lshift .__doc__
728
+ __rshift__ .__doc__ = operator .rshift .__doc__
673
729
__lt__ .__doc__ = operator .lt .__doc__
674
730
__le__ .__doc__ = operator .le .__doc__
675
731
__gt__ .__doc__ = operator .gt .__doc__
@@ -724,6 +780,12 @@ def __xor__(self, other):
724
780
def __or__ (self , other ):
725
781
return self ._binary_op (other , operator .or_ )
726
782
783
+ def __lshift__ (self , other ):
784
+ return self ._binary_op (other , operator .lshift )
785
+
786
+ def __rshift__ (self , other ):
787
+ return self ._binary_op (other , operator .rshift )
788
+
727
789
def __lt__ (self , other ):
728
790
return self ._binary_op (other , operator .lt )
729
791
@@ -782,6 +844,8 @@ def __ror__(self, other):
782
844
__and__ .__doc__ = operator .and_ .__doc__
783
845
__xor__ .__doc__ = operator .xor .__doc__
784
846
__or__ .__doc__ = operator .or_ .__doc__
847
+ __lshift__ .__doc__ = operator .lshift .__doc__
848
+ __rshift__ .__doc__ = operator .rshift .__doc__
785
849
__lt__ .__doc__ = operator .lt .__doc__
786
850
__le__ .__doc__ = operator .le .__doc__
787
851
__gt__ .__doc__ = operator .gt .__doc__
0 commit comments