예제 #1
0
파일: ObjectOps.cs 프로젝트: SueDou/python
        public static object __new__(CodeContext /*!*/ context, PythonType cls, [ParamDictionary] IDictionary <object, object> kwargs\u00F8, [NotNull] params object[] args\u00F8)
        {
            if (cls == null)
            {
                throw PythonOps.TypeError("__new__ expected type object, got {0}", PythonOps.Repr(context, DynamicHelpers.GetPythonType(cls)));
            }

            InstanceOps.CheckNewArgs(context, kwargs\u00F8, args\u00F8, cls);

            return(cls.CreateInstance(context));
        }
예제 #2
0
파일: ObjectOps.cs 프로젝트: SueDou/python
 /// <summary>
 /// Initializes the object.  The base class does nothing.
 /// </summary>
 public static void __init__(CodeContext /*!*/ context, object self, [ParamDictionary] IDictionary <object, object> kwargs, params object[] args\u00F8)
 {
     InstanceOps.CheckInitArgs(context, kwargs, args\u00F8, self);
 }
예제 #3
0
파일: ObjectOps.cs 프로젝트: SueDou/python
 /// <summary>
 /// Initializes the object.  The base class does nothing.
 /// </summary>
 public static void __init__(CodeContext /*!*/ context, object self, [NotNull] params object[] args\u00F8)
 {
     InstanceOps.CheckInitArgs(context, null, args\u00F8, self);
 }