diff options
author | Mitch Garnaat <mitch@garnaat.com> | 2012-02-15 15:03:14 -0800 |
---|---|---|
committer | Mitch Garnaat <mitch@garnaat.com> | 2012-02-21 19:14:03 -0800 |
commit | 7a49a6ec293470d1668f0dc472777dafe34d83a7 (patch) | |
tree | c0d070289b2d2dee5245819de5600adb46648bcd | |
parent | 634f03f76cf5bb0b16b9109838a74597925c5b6c (diff) | |
download | boto-7a49a6ec293470d1668f0dc472777dafe34d83a7.tar.gz |
Removing some duplicate code leftover from previous refactoring.
-rw-r--r-- | boto/dynamodb/condition.py | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/boto/dynamodb/condition.py b/boto/dynamodb/condition.py index 353756c1..b79b387f 100644 --- a/boto/dynamodb/condition.py +++ b/boto/dynamodb/condition.py @@ -24,11 +24,17 @@ from boto.dynamodb.types import get_dynamodb_type, dynamize_value, convert_num class Condition(object): + """ + Base class for conditions. Doesn't do a darn thing but allows + is to test if something is a Condition instance or not. + """ pass class ConditionNoArgs(Condition): """ + Abstract class for Conditions that require no arguments, such + as NULL or NOT_NULL. """ def __repr__(self): @@ -39,6 +45,8 @@ class ConditionNoArgs(Condition): class ConditionOneArg(Condition): """ + Abstract class for Conditions that require a single argument + such as EQ or NE. """ def __init__(self, v1): @@ -53,6 +61,8 @@ class ConditionOneArg(Condition): class ConditionTwoArgs(Condition): """ + Abstract class for Conditions that require two arguments. + The only example of this currently is BETWEEN. """ def __init__(self, v1, v2): @@ -120,20 +130,8 @@ class BEGINS_WITH(ConditionOneArg): pass class BETWEEN(ConditionTwoArgs): - """ - """ - - def __init__(self, v1, v2): - Condition.__init__(self, v1) - self.v2 = v2 - def __repr__(self): - return '%s(%s, %s)' % (self.__class__.__name__, self.v1, self.v2) - - def to_dict(self): - values = (self.v1, self.v2) - return {'AttributeValueList': [dynamize_value(v) for v in values], - 'ComparisonOperator': self.__class__.__name__} + pass |