Back to index

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

List of all members.

Public Member Functions

def __init__
def __str__
def __repr__

Public Attributes


Detailed Description

A date associated with a clade/node.

Its value can be numerical by using the 'value' element and/or free text
with the 'desc' element' (e.g. 'Silurian'). If a numerical value is used, it
is recommended to employ the 'unit' attribute.

    unit : string
        type of numerical value (e.g. 'mya' for 'million years ago')
    value : float
        the date value
    desc : string
        plain-text description of the date
    minimum : float
        lower bound on the date value
    maximum : float
        upper bound on the date value

Definition at line 676 of file

Constructor & Destructor Documentation

def Bio.Phylo.PhyloXML.Date.__init__ (   self,
  value = None,
  unit = None,
  desc = None,
  minimum = None,
  maximum = None 

Definition at line 696 of file

00697             minimum=None, maximum=None):
00698         self.value = value
00699         self.unit = unit
00700         self.desc = desc
00701         self.minimum = minimum
00702         self.maximum = maximum

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

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                                   ))

Show the class name and the human-readable date.

Definition at line 703 of file

00704     def __str__(self):
00705         """Show the class name and the human-readable date."""
00706         if self.unit and self.value is not None:
00707             return '%s %s' % (self.value, self.unit)
00708         if self.desc is not None:
00709             return self.desc
00710         return self.__class__.__name__

Member Data Documentation

Definition at line 699 of file

Definition at line 701 of file

Definition at line 700 of file

Definition at line 698 of file

Definition at line 697 of file

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