diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-22 00:34:34 +0300 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-22 00:34:34 +0300 |
| commit | 707cae749424104660cd24e7c1f1e16d67b99b0f (patch) | |
| tree | 792de897348ae678d4c9908870a328636f25ae6c /py/mpconfig.h | |
| parent | 26b7d8a7be48211557cf009f3f792d926d03cdf2 (diff) | |
py/obj: Issue a warning when str and bytes objects are compared.
Something like:
if foo == "bar":
will be always false if foo is b"bar". In CPython, warning is issued if
interpreter is started as "python3 -b". In MicroPython,
MICROPY_PY_STR_BYTES_CMP_WARN setting controls it.
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 19e290c37..2ba5f1acf 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -590,6 +590,11 @@ typedef double mp_float_t; #define MICROPY_PY_ASYNC_AWAIT (1) #endif +// Support for async/await/async for/async with +#ifndef MICROPY_PY_STR_BYTES_CMP_WARN +#define MICROPY_PY_STR_BYTES_CMP_WARN (0) +#endif + // Whether str object is proper unicode #ifndef MICROPY_PY_BUILTINS_STR_UNICODE #define MICROPY_PY_BUILTINS_STR_UNICODE (0) |
