diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-05-18 01:31:36 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-05-18 01:31:36 +0200 |
commit | 3e4f3936e187cdc9625bc30d9d2b27ecd91d8e59 (patch) | |
tree | 8ebef768460fd6fc8b105d9d3c754a81f5ac301d /src | |
parent | ae57afda5cc99616d8a6f388cffbf0ec23f59c6a (diff) | |
download | semantic-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.py | 5 |
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): |