Xiang Zhang added the comment: gettext_c2py.patch tries to avoid the problem. It still uses eval but manually parse the expression using tokens extracted from gettext. Tests are passed.
But there is still a problem. Both patched and original c2py fail to handle nested ternary operator. They respect the right associative but fails to handle expressions like '1?2?3:4:5'. ---------- keywords: +patch Added file: http://bugs.python.org/file45345/gettext_c2py.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28563> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com