[issue11681] -b option undocumented

Éric Araujo report at bugs.python.org
Sat Mar 26 02:08:35 CET 2011


Éric Araujo <merwok at netwok.org> added the comment:

The code definitely is in 2.7.

Python/_warnings.c:861:    if (Py_BytesWarningFlag > 1)
Python/_warnings.c:863:    else if (Py_BytesWarningFlag)
Python/_warnings.c:867:    PyList_SET_ITEM(filters, pos++, create_filter(PyExc_BytesWarning,
Python/sysmodule.c:1257:    SetFlag(Py_BytesWarningFlag);
Python/pythonrun.c:81:int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
Include/pydebug.h:14:PyAPI_DATA(int) Py_BytesWarningFlag;
Include/pyerrors.h:178:PyAPI_DATA(PyObject *) PyExc_BytesWarning;
Modules/main.c:285:            Py_BytesWarningFlag++;
Objects/bytearrayobject.c:1003:    if (Py_BytesWarningFlag) {
Objects/bytearrayobject.c:1004:        if (PyErr_WarnEx(PyExc_BytesWarning,
Objects/bytearrayobject.c:1028:        if (Py_BytesWarningFlag && op == Py_EQ) {
Objects/bytearrayobject.c:1029:            if (PyErr_WarnEx(PyExc_BytesWarning,
Objects/exceptions.c:2018: *    BytesWarning extends Warning
Objects/exceptions.c:2020:SimpleExtendsException(PyExc_Warning, BytesWarning,
Objects/exceptions.c:2110:    PRE_INIT(BytesWarning)
Objects/exceptions.c:2178:    POST_INIT(BytesWarning)
Lib/warnings.py:399:    simplefilter(bytes_action, category=BytesWarning, append=1)
Lib/test/test_bytes.py:25:            with test.test_support.check_warnings(('', BytesWarning)):
Lib/test/exception_hierarchy.txt:50:	   +-- BytesWarning
Include/pydebug.h:14:PyAPI_DATA(int) Py_BytesWarningFlag;
Include/pyerrors.h:178:PyAPI_DATA(PyObject *) PyExc_BytesWarning;
Doc/library/warnings.rst:164:* :exc:`BytesWarning` is ignored unless the :option:`-b` option is given once or

----------
nosy: +georg.brandl

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11681>
_______________________________________


More information about the Python-bugs-list mailing list