Issue 924361: unicodeobjct: bad argument to internal function (original) (raw)
[forwarded from http://bugs.debian.org/239986]
#! /usr/bin/python2.3 import unicodedata unicodedata.normalize('NFKC', u'')
I guess (but haven't looked at the source) that something isn't cleaned up properly in this scenario. The bug doesn't manifest itself in the normalize() call itself but the exception is thrown in the next statement. (eg running unicodedata.normalize('NFKC', u'') ; x = 1 interactively causes the error to be printed after the x=1 statement)
The x=1 doesn't seem to be needed, simply hitting return shows the message.
$ python Python 2.3.3 (#2, Feb 24 2004, 09:29:20) [GCC 3.3.3 (Debian)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import unicodedata unicodedata.normalize('NFKC', u'') u''
SystemError: ../Objects/unicodeobject.c:278: bad argument to internal function