From 51bbe54f2dbf428a2a9cde46014c0a2f9f43d87e Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 25 Jan 2021 02:45:07 -0800 Subject: [PATCH] Improve winglob docstring. Clarify that "right results" really means consistent with windows behavior. --- voussoirkit/winglob.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/voussoirkit/winglob.py b/voussoirkit/winglob.py index f3043ad..14e7234 100644 --- a/voussoirkit/winglob.py +++ b/voussoirkit/winglob.py @@ -3,10 +3,11 @@ On Windows, square brackets do not have a special meaning in glob strings. However, python's glob module is written for unix-style globs in which brackets represent character classes / ranges. -On Windows we should escape those brackets to get the right results. -But calling glob.escape would also escape asterisk which may not be desired. -So this module just provides a modified version of glob.glob which will escape -only square brackets when called on windows, and behave normally on linux. +On Windows we should escape those brackets to get results that are consistent +with a Windows' user's expectations. But calling glob.escape would also escape +asterisk which may not be desired. So this module just provides a modified +version of glob.glob which will escape only square brackets when called on +Windows, and behave normally on Linux. ''' import fnmatch as python_fnmatch import glob as python_glob