summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2012-05-18 01:31:36 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2012-05-18 01:31:36 +0200
commit3e4f3936e187cdc9625bc30d9d2b27ecd91d8e59 (patch)
tree8ebef768460fd6fc8b105d9d3c754a81f5ac301d /src
parentae57afda5cc99616d8a6f388cffbf0ec23f59c6a (diff)
downloadsemantic-version-3e4f3936e187cdc9625bc30d9d2b27ecd91d8e59.tar.gz
Allow passing in spec lists in separate arguments to SpecList.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'src')
-rw-r--r--src/semantic_version/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/semantic_version/base.py b/src/semantic_version/base.py
index d776143..bec1a79 100644
--- a/src/semantic_version/base.py
+++ b/src/semantic_version/base.py
@@ -324,8 +324,9 @@ class Spec(object):
class SpecList(object):
- def __init__(self, specs_string):
- self.specs = self.parse(specs_string)
+ def __init__(self, *specs_strings):
+ subspecs = [self.parse(spec) for spec in specs_strings]
+ self.specs = sum(subspecs, ())
@classmethod
def parse(self, specs_string):