Package schrodinger :: Package application :: Package jaguar :: Module results :: Class _Attribute
[hide private]
[frames] | no frames]

Class _Attribute

object --+
         |
        _Attribute

A small utility class to automate and regularize handling of attributes.

Instance Methods [hide private]
 
__init__(self, name, description='', datatype='', units=None, init=<function <lambda> at 0x7f595963ec80>, comparison=0, precision=None, renamed_from=None)
Arguments
 
__cmp__(self, other)
Provide for sorting based on the name.
 
summary(self, indent=0)
Provide a summary of the attribute suitable for a class docstring.
 
__repr__(self)
repr(x)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, description='', datatype='', units=None, init=<function <lambda> at 0x7f595963ec80>, comparison=0, precision=None, renamed_from=None)
(Constructor)

 

Arguments

name (str)
    Attribute name

description (str)
    A description of the attribute appropriate for inclusion in the
    class docstring.

datatype (str)
    An indication of the data type, also for inclusion in the class
    docstring.

units (str)
    The units of the attribute; included in the docstring.

init (function)
    A function returning the initial value for the attribute. This
    must be a function so that things like empty lists and
    dictionaries aren't shared across multiple instances of
    JaguarOutputs.

comparison (object)
    The type of comparison to use for this attribute. If None, no
    comparison will be made.

precision (str)
    The name of the class attribute to use for the precision value
    in _LIST_PRECISION or _FLOAT_PRECISION comparisons.

renamed_from (str)
    If a name is provided, an "alias" property will be set up to
    ensure that a renamed attribute will still be available under
    the old name.

Overrides: object.__init__

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)