aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-06-19 04:24:06 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-06-19 04:24:06 +0300
commit7334e41998fb99dfd10dcf9fd977967ceb0f79f2 (patch)
tree07d821e70b1d72de917d0f6470bbbc184afc159e /pomu/util/str.py
parentmajor refactoring of pomu package source module (diff)
downloadpomu-7334e41998fb99dfd10dcf9fd977967ceb0f79f2.tar.gz
pomu-7334e41998fb99dfd10dcf9fd977967ceb0f79f2.tar.bz2
pomu-7334e41998fb99dfd10dcf9fd977967ceb0f79f2.zip
Numerous improvements and fixes
Documented most of the functions and classes. Added an option to fetch a package into a specified directory. Added a merge_into method to the Package class, which would merge it into a directory, and refactored repo::merge_package to use that. Extended the package class to store category, version and slot metadata. Added tests of the portage package source module.
Diffstat (limited to 'pomu/util/str.py')
-rw-r--r--pomu/util/str.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pomu/util/str.py b/pomu/util/str.py
index 419425b..96a7c81 100644
--- a/pomu/util/str.py
+++ b/pomu/util/str.py
@@ -1,4 +1,10 @@
+"""String processing utilities"""
def pivot(string, idx, keep_pivot=True):
+ """
+ A function to split a string in two, pivoting at string[idx].
+ If keep_pivot is set, the pivot character is included in the second string.
+ Alternatively, it is omitted.
+ """
if keep_pivot:
return (string[:idx], string[idx:])
else: