Package intermine :: Module results :: Class ResultRow
[hide private]
[frames] | no frames]

Class ResultRow

source code

object --+
         |
        ResultRow
Known Subclasses:

An object for representing a row of data received back from the server.

ResultRows provide access to the fields of the row through index lookup. However, for convenience both list indexes and dictionary keys can be used. So the following all work:

>>> # Assuming the view is "Gene.symbol", "Gene.organism.name":
>>> row[0] == row["symbol"] == row["Gene.symbol"]
... True
Instance Methods [hide private]
 
__init__(self, data, views)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__len__(self)
Return the number of cells in this row
source code
 
__iter__(self)
Return the list view of the row, so each cell can be processed
source code
 
_get_index_for(self, key) source code
 
__str__(self)
str(x)
source code
 
__getitem__(self, key) source code
 
to_l(self)
Return a list view of this row
source code
 
to_d(self)
Return a dictionary view of this row
source code
 
items(self) source code
 
iteritems(self) source code
 
keys(self) source code
 
values(self) source code
 
itervalues(self) source code
 
iterkeys(self) source code
 
has_key(self, key) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data, views)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)