Skip to content

Commit 06ff7eb

Browse files
author
Franziska Geiger
committed
Change add reverse behaviour and delete hard coded "None" string.
1 parent 953dc00 commit 06ff7eb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/ObjectBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ String repr(VirtualFrame frame, Object self,
300300
@Cached("create(__MODULE__)") GetFixedAttributeNode readModuleNode,
301301
@Cached("create(__QUALNAME__)") GetFixedAttributeNode readQualNameNode) {
302302
if (self == PNone.NONE) {
303-
return "None";
303+
return "";
304304
}
305305
PythonAbstractClass type = getClass.execute(self);
306306
Object moduleName = readModuleNode.executeObject(frame, type);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/StringBuiltins.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,12 @@ protected boolean concatGuard(CharSequence left, CharSequence right) {
447447

448448
@Builtin(name = __RADD__, minNumOfPositionalArgs = 2)
449449
@GenerateNodeFactory
450-
public abstract static class RAddNode extends AddNode {
450+
public abstract static class RAddNode {
451+
@Specialization
452+
Object doAll(VirtualFrame frame, Object left, Object right,
453+
@Cached("create()") AddNode addNode) {
454+
return addNode.execute(frame, right, left);
455+
}
451456
}
452457

453458
// str.startswith(prefix[, start[, end]])

0 commit comments

Comments
 (0)