summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-07-22 00:34:34 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-07-22 00:34:34 +0300
commit707cae749424104660cd24e7c1f1e16d67b99b0f (patch)
tree792de897348ae678d4c9908870a328636f25ae6c /py/mpconfig.h
parent26b7d8a7be48211557cf009f3f792d926d03cdf2 (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.h5
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)