File: SpeciesReference.py

package info (click to toggle)
cain 1.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 29,856 kB
  • sloc: cpp: 49,612; python: 14,988; xml: 11,654; ansic: 3,644; makefile: 133; sh: 2
file content (21 lines) | stat: -rw-r--r-- 692 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Implements the SpeciesReference class."""

class SpeciesReference:
    """Comprised of a species identifier and the stoichiometry.

    The stoichiometry is the multiplicity of the species in the reaction."""
    
    def __init__(self, species, stoichiometry):
        """
        Construct from the species identifier and the stoichiometry.
        >>> from SpeciesReference import SpeciesReference
        >>> x = SpeciesReference('a', 2)
        >>> x.species
        'a'
        >>> x.stoichiometry
        2
        """
        # The species identifier is a string.
        self.species = species
        # The stoichiometry is an integer.
        self.stoichiometry = stoichiometry