diff options
| author | Ravera Thibault <ravera.thibault+github@gmail.com> | 2020-06-03 16:47:10 -0700 |
|---|---|---|
| committer | Thibault Ravera <ravera.thibault+github@gmail.com> | 2020-06-03 18:02:12 -0700 |
| commit | 8862edefa4b020a0d92db68210cedebe9b60835b (patch) | |
| tree | 1eb33763049e52fe18cb04fa0d0762badfebc6fd | |
| parent | 13b3034d5f180fb34706871ec74ddf841c34992d (diff) | |
| download | pyramid-8862edefa4b020a0d92db68210cedebe9b60835b.tar.gz pyramid-8862edefa4b020a0d92db68210cedebe9b60835b.tar.bz2 pyramid-8862edefa4b020a0d92db68210cedebe9b60835b.zip | |
Update src/pyramid/settings.py
Co-authored-by: Steve Piercy <web@stevepiercy.com>
| -rw-r--r-- | CHANGES.rst | 3 | ||||
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | src/pyramid/settings.py | 7 |
3 files changed, 9 insertions, 3 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 3bd14705d..d7473cec5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ unreleased Features -------- +- The ``aslist`` method now handles non-string object when flattening. + See https://github.com/Pylons/pyramid/pull/3594 + - It is now possible to pass multiple values to the ``header`` predicate for route and view configuration. See https://github.com/Pylons/pyramid/pull/3576 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 550639ae0..d527b1a04 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -352,3 +352,5 @@ Contributors - Andrea Borghi, 2019/11/11 - Sergey Maranchuk, 2020/04/18 + +- Thibault Ravera, 2020/06/03
\ No newline at end of file diff --git a/src/pyramid/settings.py b/src/pyramid/settings.py index fbfa1a57d..d6e4ea9b2 100644 --- a/src/pyramid/settings.py +++ b/src/pyramid/settings.py @@ -21,9 +21,10 @@ def aslist_cronly(value): def aslist(value, flatten=True): - """ Return a list. Separating the input based on newlines - and, if flatten=True (the default), also split on spaces within - each line when value is a string.""" + """ Return a list, separating the input based on newlines. + Also if ``flatten`` is ``True`` (the default), and if the line + is a string, then the line will be split on spaces. + """ values = aslist_cronly(value) if not flatten: return values |
