public static PythonType CreateSubType(PythonContext/*!*/ context, PythonType baseType, string name, string module, string documentation) { PythonType res = new PythonType(context, baseType, name, module, documentation); res.SetCustomMember(context.SharedContext, "__weakref__", new PythonTypeWeakRefSlot(res)); res.IsWeakReferencable = true; return res; }
public static PythonType CreateSubType(PythonContext/*!*/ context, PythonType[] baseTypes, Type underlyingType, string name, string module, string documentation, Func<string, Exception> exceptionMaker) { PythonType res = new PythonType(context, baseTypes, underlyingType, name, module, documentation, exceptionMaker); res.SetCustomMember(context.SharedContext, "__weakref__", new PythonTypeWeakRefSlot(res)); res.IsWeakReferencable = true; return res; }