Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0cb6937

Browse files
authored
add__eq__ method forOperandHolder class (#8710)
1 parentb221aa2 commit0cb6937

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎rest_framework/permissions.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ def __call__(self, *args, **kwargs):
4646
op2=self.op2_class(*args,**kwargs)
4747
returnself.operator_class(op1,op2)
4848

49+
def__eq__(self,other):
50+
return (
51+
isinstance(other,OperandHolder)and
52+
self.operator_class==other.operator_classand
53+
self.op1_class==other.op1_classand
54+
self.op2_class==other.op2_class
55+
)
56+
4957

5058
classAND:
5159
def__init__(self,op1,op2):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp