[issue18373] implement sys.get/setbyteswarningflag()

Antoine Pitrou report at bugs.python.org
Thu Jul 18 15:05:08 CEST 2013


Antoine Pitrou added the comment:

> > I don't know why your patch is putting this in the thread state,
> > though...
> 
> If you have multiple threads one thread might want exceptions when
> str(bytes), and the other might not.

That sounds too much of a special case to me. You can still catch
BytesWarnings inside a context manager or something.

----------

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


More information about the Python-bugs-list mailing list