MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AttrsValueIterator

Method AttrsValueIterator

tensorflow/python/util/util.cc:453–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451class AttrsValueIterator : public ValueIterator {
452 public:
453 explicit AttrsValueIterator(PyObject* nested) : nested_(nested) {
454 Py_INCREF(nested);
455 cls_.reset(PyObject_GetAttrString(nested_.get(), "__class__"));
456 if (cls_) {
457 attrs_.reset(PyObject_GetAttrString(cls_.get(), "__attrs_attrs__"));
458 if (attrs_) {
459 iter_.reset(PyObject_GetIter(attrs_.get()));
460 }
461 }
462 if (!iter_ || PyErr_Occurred()) invalidate();
463 }
464
465 Safe_PyObjectPtr next() override {
466 Safe_PyObjectPtr result;

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected