INADA Naoki added the comment: > You should check if _PyUnicode_FromId() returns NULL if it was the first call > and the UTF-8 decode failed to allocate memory.
thanks. new patch will fix it. > You might initialize all these identifiers (and check for errors) in > init_types() to avoid having to check for errors each time they are used. Here is not so performance critical part. > But the _ast module is not imported by default, only in programs importing > "ast" explicitly. > Well, I'm not opposed to the change, I'm just trying to understand how the > code is used ;-) We use Flask. Flask is based on Werkzeug. Werkzeug imports inspect. inspect imports ast. ast imports _ast. ---------- Added file: http://bugs.python.org/file46416/ast-identifier4.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29369> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com