Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.Phylo.PhyloXML.Id Class Reference
Inheritance diagram for Bio.Phylo.PhyloXML.Id:
Inheritance graph
[legend]
Collaboration diagram for Bio.Phylo.PhyloXML.Id:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __str__
def __repr__

Public Attributes

 value
 provider

Detailed Description

A general-purpose identifier element.

Allows to indicate the provider (or authority) of an identifier, e.g. NCBI,
along with the value itself.

Definition at line 797 of file PhyloXML.py.


Constructor & Destructor Documentation

def Bio.Phylo.PhyloXML.Id.__init__ (   self,
  value,
  provider = None 
)

Definition at line 803 of file PhyloXML.py.

00803 
00804     def __init__(self, value, provider=None):
00805         self.value = value
00806         self.provider = provider


Member Function Documentation

def Bio.Phylo.BaseTree.TreeElement.__repr__ (   self) [inherited]
Show this object's constructor with its primitive arguments.

Definition at line 216 of file BaseTree.py.

00216 
00217     def __repr__(self):
00218         """Show this object's constructor with its primitive arguments."""
00219         def pair_as_kwarg_string(key, val):
00220             if isinstance(val, basestring):
00221                 return "%s='%s'" % (key, _sugar.trim_str(unicode(val)))
00222             return "%s=%s" % (key, val)
00223         return u'%s(%s)' % (self.__class__.__name__,
00224                             ', '.join(pair_as_kwarg_string(key, val)
00225                                   for key, val in self.__dict__.iteritems()
00226                                   if val is not None and
00227                                   type(val) in (str, int, float, bool, unicode)
00228                                   ))

Definition at line 807 of file PhyloXML.py.

00807 
00808     def __str__(self):
00809         if self.provider is not None:
00810             return '%s:%s' % (self.provider, self.value)
00811         return self.value
00812 


Member Data Documentation

Definition at line 805 of file PhyloXML.py.

Definition at line 804 of file PhyloXML.py.


The documentation for this class was generated from the following file: