Return True if the given attribute on the given instance is instrumented by the attributes package. This function may be used regardless of instrumentation applied directly to the class, i.e. no descriptors are required.
(instance, key)
| 689 | |
| 690 | |
| 691 | def is_instrumented(instance, key): |
| 692 | """Return True if the given attribute on the given instance is |
| 693 | instrumented by the attributes package. |
| 694 | |
| 695 | This function may be used regardless of instrumentation |
| 696 | applied directly to the class, i.e. no descriptors are required. |
| 697 | |
| 698 | """ |
| 699 | return manager_of_class(instance.__class__).is_instrumented( |
| 700 | key, search=True |
| 701 | ) |
| 702 | |
| 703 | |
| 704 | def _generate_init(class_, class_manager, original_init): |