[issue33880] namedtuple should use NFKD to find duplicate members

2019-12-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking as closed for the reasons listed above. Other thoughts: * In the class form with types.NamedTuple, no error is raised. * In the function form with collections.namedtuple, the various TypeErrors and ValueErrors are just courtesy checks intended

[issue33880] namedtuple should use NFKD to find duplicate members

2019-12-08 Thread Batuhan
Batuhan added the comment: Hey @rhettinger, what is the status of this issue? Is there a consensus about fixing it or can this issue be closed? -- nosy: +BTaskaya ___ Python tracker

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Of late, people have been very concerned with namedtuple construction time, so I'm disinclined to add this overhead for something that doesn't seem to have been a problem in the real world. Also, the SyntaxError seems reasonable. That is the same error

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Actually, should this be NKFC? >From https://docs.python.org/3.6/reference/lexical_analysis.html#identifiers : "All identifiers are converted into the normal form NFKC while parsing; comparison of identifiers is based on NFKC." --

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: See issue 33881 for the corresponding dataclasses issue. -- nosy: +rhettinger ___ Python tracker ___

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Not that it really matters to this issue, but here's how dataclasses and attrs deal with this: dataclasses has the same issue, via make_dataclass(). attrs gives a syntax error with your field names, but interestingly this succeeds: >>> Foo =

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread John Cooke
New submission from John Cooke : from collections import namedtuple # create a namedtuple whose members are: # 00B5;MICRO SIGN;Ll; # 03BC;GREEK SMALL LETTER MU;Ll # these are both legal identifier names names = ['\u00b5', '\u03bc'] for name in names: assert name.isidentifier() mu =