Package pygene :: Module gamete :: Class Gamete
[show private | hide private]
[frames | no frames]

Type Gamete

object --+    
         |    
PGXmlMixin --+
             |
            Gamete


Contains a set of genes.

Two gametes can be added together to form a new organism
Method Summary
  __init__(self, orgclass, **genes)
Creates a new gamete from a set of genes
  __add__(self, other)
Combines this gamete with another gamete to form an organism
  __getitem__(self, name)
Fetch a single gene by name
  conceive(self, other)
Returns a whole new Organism class from the combination of this gamete with another
    Inherited from PGXmlMixin
  xmlDump(self, fileobj)
Dumps out the population to an open file in XML format.
  xmlDumpAttribs(self, tag)
  xmlDumpClass(self, tag)
dumps out class information
  xmlDumps(self)
dumps out to xml, returning a string of the raw generated xml
  xmlDumpSelf(self, doc, parent)
Writes out the contents of this population into the xml tree
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, orgclass, **genes)
(Constructor)

Creates a new gamete from a set of genes
Overrides:
__builtin__.object.__init__

__add__(self, other)
(Addition operator)

Combines this gamete with another gamete to form an organism

__getitem__(self, name)
(Indexing operator)

Fetch a single gene by name

conceive(self, other)

Returns a whole new Organism class from the combination of this gamete with another

Generated by Epydoc 2.1 on Mon Dec 12 14:37:12 2005 http://epydoc.sf.net