Back to index

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

List of all members.

Public Member Functions

def __init__
def __iter__
def __repr__

Public Attributes


Detailed Description

Container for non-phyloXML elements in the tree.

Usually, an Other object will have either a 'value' or a non-empty list
of 'children', but not both. This is not enforced here, though.

    tag : string
        local tag for the XML node
    namespace : string
        XML namespace for the node -- should not be the default phyloXML
    attributes : dict of strings
        attributes on the XML node
    value : string
        text contained directly within this XML node
    children : list 
        child nodes, if any (also `Other` instances)

Definition at line 98 of file

Constructor & Destructor Documentation

def Bio.Phylo.PhyloXML.Other.__init__ (   self,
  namespace = None,
  attributes = None,
  value = None,
  children = None 

Definition at line 118 of file

00119             children=None):
00120         self.tag = tag
00121         self.namespace = namespace
00122         self.attributes = attributes or {}
00123         self.value = value
00124         self.children = children or []

Member Function Documentation

Iterate through the children of this object (if any).

Definition at line 125 of file

00126     def __iter__(self):
00127         """Iterate through the children of this object (if any)."""
00128         return iter(self.children)

Here is the caller graph for this function:

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

Member Data Documentation

Definition at line 121 of file

Definition at line 123 of file

Definition at line 120 of file

Definition at line 119 of file

Definition at line 122 of file

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