map_attr
map attribute name to another
Last updated
map attribute name to another
Last updated
Maps an attribute name to another attribute name. Nothing is returned.
Attribute names that are mapped to another attribute name will allow it to follow that name's value. The name that requests the map, will become the child, and the name that the child maps to becomes the parent. Attribute names for the child and parent must already exist to map them.
This feature works similarly to the concept of a pointer. It also maintains reference to the same object in memory naturally from python's inherent optimization design.
See more information on the mapping concept in the language section.
Basic Example of mapping a name using default positional parameters
In this example, we simply map an attribute name that already exists in the using the map_attr method and pass a string of the child attribute name as the first argument to the method, then pass the parent attribute name as the second argument to the method.
Methods that provide related utility to this method
-> Unmap an attribute name -> Get all parent and child maps -> Get all parent maps -> Get all child maps -> Get parent maps represented as a chain -> Check if attribute name is a parent mapped with children -> Check if attribute name is a child mapped to a parent
Describes all parameter functionality and accepted data types