New submission from Vajrasky Kok: >>> import array >>> array.array(u'i', [1,2,3]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: must be char, not unicode
In this ticket #13566, Alexandre Vassalotti said: "We should still fix array in 2.7 to accept unicode object for the typecode though." So here is the patch to add support for ascii-unicode typecode for array.array constructor. ---------- components: Extension Modules files: makes_array_accepts_ascii_unicode_typecode.patch keywords: patch messages: 206503 nosy: alexandre.vassalotti, vajrasky priority: normal severity: normal status: open title: Makes array.array constructor accepts ascii-unicode typecode type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file33184/makes_array_accepts_ascii_unicode_typecode.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20014> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com