diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-04 00:09:23 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-04 00:09:48 +0300 |
commit | ac2f7a7f6aab135e90dd12d30b51d857628b0a59 (patch) | |
tree | 8d4e21696251c3124313073818dd583862c94dfd /py/mpconfig.h | |
parent | 82f37bf0d1080b4f508a6af36088cbe12b50c70b (diff) |
objstr: Add .splitlines() method.
splitlines() occurs ~179 times in CPython3 standard library, so was
deemed worthy to implement. The method has subtle semantic differences
from just .split("\n"). It is also defined as working for any end-of-line
combination, but this is currently not implemented - it works only with
LF line-endings (which should be OK for text strings on any platforms,
but not OK for bytes).
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 27ec5dd3e..b2f37e99c 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -407,6 +407,11 @@ typedef double mp_float_t; #define MICROPY_PY_BUILTINS_STR_UNICODE (0) #endif +// Whether str.splitlines() method provided +#ifndef MICROPY_PY_BUILTINS_STR_SPLITLINES +#define MICROPY_PY_BUILTINS_STR_SPLITLINES (0) +#endif + // Whether to support bytearray object #ifndef MICROPY_PY_BUILTINS_BYTEARRAY #define MICROPY_PY_BUILTINS_BYTEARRAY (1) |