summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2009-01-04 07:58:15 -0500
committerCasey Dahlin <cdahlin@redhat.com>2009-01-04 07:58:15 -0500
commitbd69d3a1bbc71e0e6464edb3c684c41497d3801a (patch)
tree0946fc754824615aa6ed5679a636205d6c92b35c
parent07fc1697b0bf531413a11d043374318c4d8f1fa8 (diff)
downloadupstate-bd69d3a1bbc71e0e6464edb3c684c41497d3801a.tar.gz
upstate-bd69d3a1bbc71e0e6464edb3c684c41497d3801a.tar.xz
upstate-bd69d3a1bbc71e0e6464edb3c684c41497d3801a.zip
Change comment language in category.py
Categories can contain states OR events. Comments now reflect this
-rw-r--r--category.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/category.py b/category.py
index 81f26c8..eda7ab7 100644
--- a/category.py
+++ b/category.py
@@ -4,19 +4,19 @@ from pattern import Pattern
class Category:
"""
- A Category is a "set" of states. The category specifies a name, certain
- arguments that must be provided, and constraints for the values of those
- arguments. Any possible state which meets these restrictions is in the
- category.
+ A Category is a "set" of states or events. The category specifies a name,
+ certain arguments that must be provided, and constraints for the values of
+ those arguments. Any possible state/event which meets these restrictions is
+ in the category.
"""
def __init__(self, name, **args):
"""
Categories are constructed with a `name` and a series of keyword
arguments. `name` is a string. Each keyword argument that is specified
- is the name of a state argument a state must posess to be considered to
- be a member of the category. The value of the keyword arguments are
- patterns that must match the value of the state argument.
+ is the name of an argument a state or event must posess to be considered
+ to be a member of the category. The value of the keyword arguments are
+ patterns that must match the value of the argument.
"""
self.args = args
self.name = name
@@ -33,7 +33,7 @@ class Category:
def subtract(self, other):
"""
- returns a set of categories that, when combined, include all states
+ returns a set of categories that, when combined, include all items
that are in `self` but *not* in `other`
"""
retval = set()
@@ -46,7 +46,7 @@ class Category:
def inverse_set(self):
"""
- Returns a set of Categories that will match any state NOT matched by
+ Returns a set of Categories that will match any item NOT matched by
this one (provided it specifies the same or more arguments).
"""
retval = set()
@@ -61,7 +61,7 @@ class Category:
def intersect(self, other):
"""
- Returns a new category consisting only of states that are in this
+ Returns a new category consisting only of items that are in this
category, and the category `other`.
"""
if self.name != other.name: return None