Inheritance: IronPython.Runtime.Types.PythonTypeSlot, ICodeFormattable
示例#1
0
        public new object __get__(CodeContext/*!*/ context, object instance, object owner) {
            PythonType selfType = PythonType;

            if (selfType == TypeCache.Super) {
                Super res = new Super();
                res.__init__(_thisClass, instance);
                return res;
            }

            return PythonCalls.Call(context, selfType, _thisClass, instance);
        }
示例#2
0
        public new object __get__(CodeContext /*!*/ context, object instance, object owner)
        {
            PythonType selfType = PythonType;

            if (selfType == TypeCache.Super)
            {
                Super res = new Super();
                res.__init__(_thisClass, instance);
                return(res);
            }

            return(PythonCalls.Call(context, selfType, _thisClass, instance));
        }
示例#3
0
        public object GetAttribute(object instance, object owner)
        {
            DynamicType selfType = GetDynamicType();

            if (selfType == TypeCache.Super) {
                Super res = new Super();
                res.Initialize(__thisclass__, instance);
                return res;
            }

            return selfType.Call(DefaultContext.Default, __thisclass__, instance);
        }