From 7334e41998fb99dfd10dcf9fd977967ceb0f79f2 Mon Sep 17 00:00:00 2001 From: Mykyta Holubakha Date: Mon, 19 Jun 2017 04:24:06 +0300 Subject: 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. --- pomu/util/str.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pomu/util/str.py') 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: -- cgit v1.2.3-65-gdbad