Similar to above, just specialized for the functions in the data package.
| 546 | |
| 547 | // Similar to above, just specialized for the functions in the data package. |
| 548 | ValueIteratorPtr GetValueIteratorForData(PyObject* nested) { |
| 549 | if (PyDict_Check(nested)) { |
| 550 | return absl::make_unique<DictValueIterator>(nested); |
| 551 | } else if (IsMappingHelper(nested)) { |
| 552 | return absl::make_unique<MappingValueIterator>(nested); |
| 553 | } else if (IsAttrsHelper(nested)) { |
| 554 | return absl::make_unique<AttrsValueIterator>(nested); |
| 555 | } else if (IsSparseTensorValueType(nested)) { |
| 556 | return absl::make_unique<SingleValueIterator>(nested); |
| 557 | } else { |
| 558 | return absl::make_unique<SequenceValueIterator>(nested); |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | // Similar to GetValueIterator above, but expands CompositeTensor and TypeSpec. |
| 563 | ValueIteratorPtr GetValueIteratorForComposite(PyObject* nested) { |
nothing calls this directly
no test coverage detected