projects
/
gentoolkit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8db7d7
)
cpv: define package_list in compare_strs doctest
author
W. Trevor King
<wking@tremily.us>
Mon, 12 Nov 2012 02:54:17 +0000
(21:54 -0500)
committer
W. Trevor King
<wking@tremily.us>
Mon, 12 Nov 2012 02:54:17 +0000
(21:54 -0500)
This is not much of a doctest, since we aren't using compare_strs()
anywhere, but at least it doesn't error out. Note that comparisons
have been reworked in Python 3 where cmp() has been removed.
pym/gentoolkit/cpv.py
patch
|
blob
|
history
diff --git
a/pym/gentoolkit/cpv.py
b/pym/gentoolkit/cpv.py
index cda68d75c65f5b843c8b3b2e95f294a83ed726bc..9c7243178170f358c7133e2e76101e73d1bf6b46 100644
(file)
--- a/
pym/gentoolkit/cpv.py
+++ b/
pym/gentoolkit/cpv.py
@@
-178,6
+178,7
@@
def compare_strs(pkg1, pkg2):
as: package_list.sort(cpv.compare_strs)
An alternative is to use the CPV descriptor from gentoolkit.cpv:
+ >>> package_list = ['sys-apps/portage-9999', 'media-video/ffmpeg-9999']
>>> cpvs = sorted(CPV(x) for x in package_list)
@see: >>> help(cmp)