[issue17331] namedtuple raises a SyntaxError instead of ValueError on invalid identifier
Raymond Hettinger added the comment: Thanks for the suggestion. isidentifier() was exactly what was needed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] namedtuple raises a SyntaxError instead of ValueError on invalid identifier
Florent Xicluna added the comment: This is consistent: '¹'.isnumeric(), '¹'.isdigit(), '¹'.isdecimal() (True, True, False) unicodedata.numeric('¹') 1.0 unicodedata.digit('¹') 1 unicodedata.decimal('¹') Traceback (most recent call last): File stdin, line 1, in module ValueError: not a decimal Changing the title to focus on the issue with collections.namedtuple. -- components: +Library (Lib) title: Fix str methods for detecting digits with unicode - namedtuple raises a SyntaxError instead of ValueError on invalid identifier versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] namedtuple raises a SyntaxError instead of ValueError on invalid identifier
Antoine Pitrou added the comment: namedtuple should simply use isidentifier(), rather than isalnum(). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] namedtuple raises a SyntaxError instead of ValueError on invalid identifier
Ramchandra Apte added the comment: namedtuple should simply use isidentifier(), rather than isalnum(). +2 -- nosy: +Ramchandra Apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] namedtuple raises a SyntaxError instead of ValueError on invalid identifier
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] namedtuple raises a SyntaxError instead of ValueError on invalid identifier
Roundup Robot added the comment: New changeset 80bcc98bf939 by Raymond Hettinger in branch '3.3': Issue #17331: Use isidentifier() instead of isalnum() to check for valid identifiers. http://hg.python.org/cpython/rev/80bcc98bf939 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com