From 63251b979b45c520ac42a51996590ecd8b63ad38 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 9 Aug 2021 16:27:33 -0700 Subject: [PATCH] Describe Path parameters in docstring. --- voussoirkit/pathclass.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index 0f1b30d..3cb9bff 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -82,10 +82,25 @@ class Extension: return '.' + self.ext class Path: - ''' - I started to use pathlib.Path, but it was too much of a pain. - ''' - def __init__(self, path, force_sep=None, *, _case_correct=False): + def __init__( + self, + path, + force_sep=None, + *, + _case_correct=False, + ): + ''' + force_sep: + Normally, the pathclass will use the default separator for your + operating system: / on unix and \ on windows. You can use this + argument to force a particular separator. + + _case_correct: + True or False. If True, this indicates that the path casing is + known in advance to be correct, which means calls to correct_case + can be skipped. This is helpful because correct_case can be a + source of slowdown. + ''' self.force_sep = force_sep self.sep = force_sep or os.sep