File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2457,6 +2457,15 @@ int get(@SuppressWarnings("unused") Object self) {
24572457 }
24582458 }
24592459
2460+ @ GenerateNodeFactory
2461+ @ Builtin (name = "as_integer_ratio" , minNumOfPositionalArgs = 1 , doc = "Return integer ratio." )
2462+ abstract static class AsIntegerRatioNode extends PythonBuiltinNode {
2463+ @ Specialization
2464+ Object get (VirtualFrame frame , Object self , @ Cached IntNode intNode ) {
2465+ return factory ().createTuple (new Object []{intNode .execute (frame , self ), 1 });
2466+ }
2467+ }
2468+
24602469 @ GenerateNodeFactory
24612470 @ Builtin (name = SpecialMethodNames .__TRUNC__ , minNumOfPositionalArgs = 1 , doc = "Truncating an Integral returns itself." )
24622471 abstract static class TruncNode extends IntNode {
You can’t perform that action at this time.
0 commit comments