Changeset 7818:22d80e06c70c in orange


Ignore:
Timestamp:
04/07/11 14:09:29 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
ae769e2145502a88b78c5bdf86ec6f9bf0d1954a
Message:

Description of Variable.attributes.

Location:
orange
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/data/variable.py

    r7686 r7818  
    6565        :obj:`Orange.core.newmetaid` if the variable is passed as an argument.  
    6666         
     67    .. attribute:: attributes 
     68         
     69        A dictionary which allows the user to store additional information 
     70        about the variable. All values should be strings. See the section  
     71        about :ref:`storing additional information <attributes>`. 
     72 
    6773    .. method:: __call__(obj) 
    6874     
     
    259265.. literalinclude:: code/variable-getValueFrom.py 
    260266    :lines: 24- 
     267 
     268.. _attributes: 
     269 
     270Storing additional variables 
     271----------------------------- 
     272 
     273All variables have a field :obj:`~Variable.attributes`. It is a dictionary 
     274which can contain strings. Although the current implementation allows all 
     275types of value we strongly advise to use only strings. An exmaple: 
     276 
     277.. literalinclude:: code/attributes.py 
    261278 
    262279Reuse of descriptors 
     
    448465variable is created. 
    449466 
     467 
     468 
    450469""" 
    451470from orange import Variable 
Note: See TracChangeset for help on using the changeset viewer.