Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/__init__.py @ 179:62db35db8939
Docu: formatting
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Thu, 02 May 2019 10:32:36 +0200 |
| parents | eeb3ed104ea1 |
| children | e87fa5bd68e7 |
comparison
equal
deleted
inserted
replaced
| 178:eeb3ed104ea1 | 179:62db35db8939 |
|---|---|
| 200 else: | 200 else: |
| 201 raise KeyError("No loader for pattern %r" % pattern) | 201 raise KeyError("No loader for pattern %r" % pattern) |
| 202 | 202 |
| 203 | 203 |
| 204 def set_loader(fnpattern, mode): | 204 def set_loader(fnpattern, mode): |
| 205 """Associate a :mod:`fnmatch` style pattern `fnpattern` with a file | 205 """Associate a :mod:`fnmatch` style pattern `fnpattern` with a |
| 206 mode `mode` that determines what will be called when :func:`load` | 206 file-mode `mode` that determines what will be called when |
| 207 encounters a file argument that matches `fnpattern`. | 207 :func:`load` encounters a file argument that matches `fnpattern`. |
| 208 | 208 |
| 209 :param str fnpattern: the :mod:`fnmatch` pattern to associate a loader with | 209 :param str fnpattern: the :mod:`fnmatch` pattern to associate a loader |
| 210 with | |
| 210 :param callable mode: a mode string or a callable that accepts a | 211 :param callable mode: a mode string or a callable that accepts a |
| 211 `filename` argument and returns a file | 212 `filename` argument and returns a file-mode for |
| 212 mode for the given file (or `None`) | 213 the given file (or `None`) |
| 213 | 214 |
| 214 This function prepends to the given pattern to the currently defined | 215 This function prepends to the given pattern to the currently defined |
| 215 associations. | 216 associations. |
| 216 | 217 |
| 217 The OS specific case-sensitivity behaviour of | 218 The OS specific case-sensitivity behaviour of |
