__new__() private method

private __new__ ( CodeContext context, PythonType cls ) : object
context CodeContext
cls PythonType
return object
示例#1
0
        public static object __getnewargs__(CodeContext context, BigInteger self)
        {
#if !FEATURE_NUMERICS
            if (!Object.ReferenceEquals(self, null))
            {
                return(PythonTuple.MakeTuple(BigIntegerOps.__new__(context, TypeCache.BigInteger, self)));
            }
            throw PythonOps.TypeErrorForBadInstance("__getnewargs__ requires a 'long' object but received a '{0}'", self);
#else
            return(PythonTuple.MakeTuple(BigIntegerOps.__new__(context, TypeCache.BigInteger, self)));
#endif
        }
示例#2
0
 public static object __getnewargs__(CodeContext context, BigInteger self)
 {
     return(PythonTuple.MakeTuple(BigIntegerOps.__new__(context, TypeCache.BigInteger, self)));
 }