Next: destroy

Prev: create

data

data(dbref)
This function retrieves all the variables on the object given by the dbref dbref. The return value is a dictionary whose associations are between ancestors of the object and subdictionaries giving the variable values for each ancestor's parameters. Each subdictionary's associations are between parameters (expressed as symbols) of the ancestor in question (as symbols) and the values of the variables corresponding to those parameters. Thus, if the object given by dbref defines a variable corresponding to a parameter parameter on an ancestor ancestor, then data(dbref)[ancestor][parameter]) is the value of that variable.

The subdictionaries in the dictionary returned by data() only contains [parameter, value] associations for variables which have been assigned values on the object given by dbref, not variables which have never been assigned values and which still have the default value 0. Also, if no variables have been assigned values for any parameters on an ancestor of the object given by dbref (as is the case when the ancestor has no parameters), then there will not be an association for that ancestor in the dictionary returned by data(). Neither the keys in the dictionary returned by data() nor the parameters in the subdictionaries have any particular ordering.

If dbref is not the dbref of an object, then data() throws an ~objnf error.