New submission from Serhiy Storchaka:

PyUnicode_FSDecoder() accepts not only str and bytes or bytes-like object, but 
arbitrary iterable, e.g. list.
Example:

>>> compile('', [116, 101, 115, 116], 'exec')
<code object <module> at 0xb6fb1340, file "test", line 1>

I think accepting arbitrary iterables is unintentional and weird behavior.

----------
components: Interpreter Core
messages: 263378
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: PyUnicode_FSDecoder() accepts arbitrary iterable
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to