From ba6e70b30b6fcefa2111192c27d4522eef13b0b3 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 19 Nov 2013 09:07:39 +0100 Subject: [PATCH] mpd: Add note about use of re.VERBOSE --- mopidy/frontends/mpd/protocol/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mopidy/frontends/mpd/protocol/__init__.py b/mopidy/frontends/mpd/protocol/__init__.py index 48a4a0a1..dbc85d78 100644 --- a/mopidy/frontends/mpd/protocol/__init__.py +++ b/mopidy/frontends/mpd/protocol/__init__.py @@ -48,6 +48,11 @@ def handle_request(pattern, auth_required=True): def do(what): ... + Note that the patterns are compiled with the :attr:`re.VERBOSE` flag. Thus, + you must escape any space characters you want to match, but you're also + free to add non-escaped whitespace to format the pattern for easier + reading. + :param pattern: regexp pattern for matching commands :type pattern: string """