Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/config.py @ 648:e8f3e970e411
__len__() for jails also now internally expands: this is for consistency with __bool__ when applyint to non-container jails (which are possible)
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 13 May 2022 07:51:40 +0200 |
| parents | df58983f28a2 |
| children | b74f20e19c01 |
comparison
equal
deleted
inserted
replaced
| 647:df58983f28a2 | 648:e8f3e970e411 |
|---|---|
| 1257 """Iteration support for containers""" | 1257 """Iteration support for containers""" |
| 1258 return iter(self._base.getvarl_s(*self._path)) | 1258 return iter(self._base.getvarl_s(*self._path)) |
| 1259 | 1259 |
| 1260 def __len__(self): | 1260 def __len__(self): |
| 1261 """Length support for containers""" | 1261 """Length support for containers""" |
| 1262 return len(self._base.getvarl(*self._path)) | 1262 return len(self._base.getvarl_s(*self._path)) |
| 1263 | 1263 |
| 1264 if PY2: | 1264 if PY2: |
| 1265 | 1265 |
| 1266 def __nonzero__(self): | 1266 def __nonzero__(self): |
| 1267 """Map- and list-style evaluation in boolean context""" | 1267 """Map- and list-style evaluation in boolean context""" |
