Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: Sorry, but _PyUnicode_AsDefaultEncodedString returns either a borrowed reference (if errors==NULL) or a new reference (if errors!=NULL). In either case it's wrong to DECREF the string when you simply take the buffer's address:
>>> f(**{u'someLongString':2}) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: f() got an unexpected keyword argument 'ÛÛÛÛÛÛÛgString' _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4978> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com