public static object __new__(CodeContext context, PythonType cls, string s, int radix) { int start = 0; if (radix == 16 || radix == 8 || radix == 2) { start = s.Length - Int32Ops.TrimRadix(s, radix).Length; } if (cls == TypeCache.BigInteger) { return ParseBigIntegerSign(s, radix, start); } else { BigInteger res = ParseBigIntegerSign(s, radix); return cls.CreateInstance(context, res); } }
public static object __new__(CodeContext context, PythonType cls, string s, int radix) { var value = LiteralParser.ParseBigIntegerSign(s, radix, Int32Ops.FindStart(s, radix)); if (cls == TypeCache.BigInteger) { return(value); } else { return(cls.CreateInstance(context, value)); } }
public static object __getnewargs__(CodeContext context, int self) { return(PythonTuple.MakeTuple(Int32Ops.__new__(context, TypeCache.Int32, self))); }
public static int ExclusiveOr(bool x, int y) { return(Int32Ops.ExclusiveOr(x ? 1 : 0, y)); }
public static int ExclusiveOr(int x, bool y) { return(Int32Ops.ExclusiveOr(y ? 1 : 0, x)); }
public static int BitwiseOr(bool x, int y) { return(Int32Ops.BitwiseOr(x ? 1 : 0, y)); }
public static int BitwiseOr(int x, bool y) { return(Int32Ops.BitwiseOr(y ? 1 : 0, x)); }