public combinationsWithReplacementDerived(PyType subtype) { super(subtype); slots = new PyObject[subtype.getNumSlots()]; dict = subtype.instDict(); if (subtype.needsFinalizer()) { FinalizeTrigger.ensureFinalizer(this); } }
public void setDict(PyObject newDict) { if (newDict instanceof PyStringMap || newDict instanceof PyDictionary) { dict = newDict; if (dict.__finditem__(PyString.fromInterned("__del__")) != null && !JyAttribute.hasAttr(this, JyAttribute.FINALIZE_TRIGGER_ATTR)) { FinalizeTrigger.ensureFinalizer(this); } } else { throw Py.TypeError("__dict__ must be set to a Dictionary " + newDict.getClass().getName()); } }
public void __ensure_finalizer__() { FinalizeTrigger.ensureFinalizer(this); }