__new__() private method

private __new__ ( CodeContext context, PythonType cls ) : object
context CodeContext
cls PythonType
return object
Esempio n. 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
        }
Esempio n. 2
0
 public static object __getnewargs__(CodeContext context, BigInteger self)
 {
     return(PythonTuple.MakeTuple(BigIntegerOps.__new__(context, TypeCache.BigInteger, self)));
 }