Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <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);
 }