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

Class DBIds


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.
Method Summary
  __init__(self, db, ids)
db, ids
  __eq__(self, other)
does this DBIds equal the other?
  __getitem__(self, i)
get an identifier or a subset of the DBIds
  __iter__(self)
Iterate over the list of identifiers
  __len__(self)
number of identifers
  __ne__(self, other)
check if this isn't equal to the other DBIds
  __repr__(self)
  __sub__(self, other)
DBIds of the identifiers in this set which aren't in the other
  item(self, i)
Get a DBIds containing the item at position i

Method Details

__init__(self, db, ids)
(Constructor)

db, ids

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

__eq__(self, other)
(Equality operator)

does this DBIds equal the other?

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

__getitem__(self, i)
(Indexing operator)

get an identifier or a subset of the DBIds

__iter__(self)

Iterate over the list of identifiers

__len__(self)
(Length operator)

number of identifers

__ne__(self, other)

check if this isn't equal to the other DBIds

__sub__(self, other)
(Subtraction operator)

DBIds of the identifiers in this set which aren't in the other

item(self, i)

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.

Generated by Epydoc 2.1 on Thu Jun 30 22:05:59 2005 http://epydoc.sf.net