summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README13
1 files changed, 10 insertions, 3 deletions
diff --git a/README b/README
index 38c5196..fb98136 100644
--- a/README
+++ b/README
@@ -25,9 +25,9 @@ Compare it to other versions::
>>> v < Version('0.1.2')
True
>>> sorted([Version('0.1.1'), Version('0.11.1'), Version('0.1.1-alpha')])
- [<SemVer(0, 1, 1, ('alpha',), ())>,
- <SemVer(0, 1, 1, (), ())>,
- <SemVer(0, 11, 1, (), ())>]
+ [<Version(0, 1, 1, ('alpha',), ())>,
+ <Version(0, 1, 1, (), ())>,
+ <Version(0, 11, 1, (), ())>]
Define a simple specification::
@@ -49,6 +49,13 @@ Define complex specifications::
False
+Select the best compatible version from a list::
+
+ >>> s = Spec('>=0.1.1,<0.2.0')
+ >>> s.select([Version('0.1.1'), Version('0.1.9-alpha'), Version('0.1.9-alpha+1'))
+ <Version(0, 1, 9, ('alpha',), (1,))>
+
+
Framework integration
=====================