summaryrefslogtreecommitdiff
path: root/doc/reference.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference.rst')
-rw-r--r--doc/reference.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/reference.rst b/doc/reference.rst
index 310b4a8..9d2619f 100644
--- a/doc/reference.rst
+++ b/doc/reference.rst
@@ -370,7 +370,7 @@ It may be useful to define a rule such as
This is possible with the :class:`SpecList` class.
-.. class:: SpecList(spec_string)
+.. class:: SpecList(spec_string[, spec_string[, ...]])
Stores a list of :class:`Spec` and matches any :class:`Version` against all
contained :class:`specs <Spec>`.
@@ -384,6 +384,16 @@ This is possible with the :class:`SpecList` class.
<Spec: !~ <~SemVer: 1 1 4 None None>>
)>
+ Version specifications may also be passed in separated arguments::
+
+ >>> SpecList('>~1.0.0', '<1.2.0', '!~1.1.4,!~1.1.13')
+ <SpecList: (
+ <Spec: >~ <~SemVer: 1 0 0 None None>>,
+ <Spec: < <SemVer: 1 2 0 [] []>>,
+ <Spec: !~ <~SemVer: 1 1 4 None None>>
+ <Spec: !~ <~SemVer: 1 1 13 None None>>
+ )>
+
.. rubric:: Attributes