Skip to content

Commit b39c6ba

Browse files
committed
Removing unnecessary condition.
1 parent 4eb8af8 commit b39c6ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/AssignmentTranslator.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,7 @@ private PNode makeAugmentedAssignment(PNode lhs, String text, PNode rhs) {
165165
throw core.raise(SyntaxError, "illegal expression for augmented assignment");
166166
}
167167
PNode binOp;
168-
if (text.charAt(text.length() - 1) == '=') {
169-
binOp = factory.createInplaceOperation(text, lhs, rhs);
170-
} else {
171-
binOp = factory.createBinaryOperation(text, lhs, rhs);
172-
}
168+
binOp = factory.createInplaceOperation(text, lhs, rhs);
173169
PNode duplicate = factory.duplicate(lhs, PNode.class);
174170
PNodeUtil.clearSourceSections(duplicate);
175171
return ((ReadNode) duplicate).makeWriteNode(binOp);

0 commit comments

Comments
 (0)