comparison configmix/__init__.py @ 188:17b938ccecb8

Rename the DEFAULT_LOADER marker to USE_DEFAULT_ASSOC
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 03 May 2019 19:46:23 +0200
parents d2eb83720ad8
children 0d0980ed74cc
comparison
equal deleted inserted replaced
187:d2eb83720ad8 188:17b938ccecb8
175 can not determined. 175 can not determined.
176 176
177 """ 177 """
178 178
179 179
180 DEFAULT_LOADER = object() 180 USE_DEFAULT_ASSOC = object()
181 """Marker for the default association for an extension. 181 """Marker for the default association for an extension.
182 182
183 To be used in :func:`set_assoc`. 183 To be used in :func:`set_assoc`.
184 """ 184 """
185 185
253 253
254 The OS specific case-sensitivity behaviour of 254 The OS specific case-sensitivity behaviour of
255 :func:`fnmatch.fnmatch` applies (i.e. :func:`os.path.normpath` 255 :func:`fnmatch.fnmatch` applies (i.e. :func:`os.path.normpath`
256 will be called for both arguments). 256 will be called for both arguments).
257 257
258 If `loader` is :data:`.DEFAULT_LOADER` then the default association 258 If `loader` is :data:`.USE_DEFAULT_ASSOC` then the default association
259 from :data:`.DEFAULT_ASSOC` will be used -- if any. 259 from :data:`.DEFAULT_ASSOC` will be used -- if any.
260 260
261 """ 261 """
262 if mode is DEFAULT_LOADER: 262 if mode is USE_DEFAULT_ASSOC:
263 for p, m in DEFAULT_ASSOC: 263 for p, m in DEFAULT_ASSOC:
264 if p == fnpattern: 264 if p == fnpattern:
265 if append: 265 if append:
266 _extensions.append((fnpattern, m)) 266 _extensions.append((fnpattern, m))
267 else: 267 else: