Package Bio :: Package EUtils :: Module Datatypes :: Class DBIds
[hide private]
[frames] | no frames]

Class DBIds

source code

Store a list of identifiers for a database

This is used as input for the '*_using_dbids' functions.

Constructed with the database name and list of identifier strings.

Instance Methods [hide private]
 
__init__(self, db, ids)
db, ids
source code
 
__len__(self)
number of identifers
source code
 
__getitem__(self, i)
get an identifier or a subset of the DBIds
source code
 
item(self, i)
Get a DBIds containing the item at position i
source code
 
__iter__(self)
Iterate over the list of identifiers
source code
 
__repr__(self) source code
 
__eq__(self, other)
does this DBIds equal the other?
source code
 
__ne__(self, other)
check if this isn't equal to the other DBIds
source code
 
__sub__(self, other)
DBIds of the identifiers in this set which aren't in the other
source code
Method Details [hide private]

__init__(self, db, ids)
(Constructor)

source code 

db, ids

'db' -- the database for those identifiers 'ids' -- a list of identifiers for the given database

item(self, i)

source code 

Get a DBIds containing the item at position i

Can't use dbids[i] since that returns only the identifier. This returns a DBIds, which can be used for another request.

__eq__(self, other)
(Equality operator)

source code 

does this DBIds equal the other?

The database names must match, but the identifiers themselves can be in any order.