Package org.python.core
Annotation Type Untraversable
-
@Retention(RUNTIME) @Target(TYPE) public @interface UntraversableIndicates that a given class is not traversable and does intentionally not implementTraverseproc. This annotation is ignored if the class implementsTraverseproc, i.e. it cannot be used to removeTraverseprocsupport of a superclass. Thus it is well defined what happens if bothTraverseprocand{@literal @}Untraversableare present:Traverseprocwins.
If a class does not implementTraverseprocand is not annotated with{@literal @}Untraversable, gc assumes that the programmers were not aware of Jython's traverse mechanism and attempts to traverse the target object by using Java-reflection (which is assumably very inefficient).