Lines Matching refs:scope
521 if (rec.scope && !PyModule_Check(rec.scope.ptr()) && hasattr(rec.scope, "__qualname__")) {
524 PyUnicode_FromFormat("%U.%U", rec.scope.attr("__qualname__").ptr(), name.ptr()));
526 qualname = str(rec.scope.attr("__qualname__").cast<std::string>() + "." + rec.name);
531 if (rec.scope) {
532 if (hasattr(rec.scope, "__module__"))
533 module = rec.scope.attr("__module__");
534 else if (hasattr(rec.scope, "__name__"))
535 module = rec.scope.attr("__name__");
611 /* Register type with the parent scope */
612 if (rec.scope)
613 setattr(rec.scope, rec.name, (PyObject *) type);