Re: [Python-Dev] PEP 540: Add a new UTF-8 mode (v3)

2017-12-09 Thread INADA Naoki
> Earlier versions of PEP 538 thus included "en_US.UTF-8" on the > candidate target locale list, but that turned out to cause assorted > problems due to the "C -> en_US" part of the coercion. Hm, but PEP 538 says: > this PEP instead proposes to extend the "surrogateescape" default for stdin > an

Re: [Python-Dev] PEP 540: Add a new UTF-8 mode (v3)

2017-12-09 Thread INADA Naoki
Now I'm OK to accept the PEP, except one nitpick. > > Locale coercion only impacts non-Python code like C libraries, whereas > the Python UTF-8 Mode only impacts Python code: the two PEPs are > complementary. > This sentence seems bit misleading. If UTF-8 mode is disabled explicitly, locale coerc

Re: [Python-Dev] Issues with PEP 526 Variable Notation at the class level

2017-12-09 Thread Nick Coghlan
On 9 December 2017 at 12:14, Nathaniel Smith wrote: > You'd have to ask Hynek to get the full rationale, but I believe it was both > for consistency with slot classes, and for consistency with regular class > definition. For example, type.__new__ actually does different things > depending on wheth

Re: [Python-Dev] Issues with PEP 526 Variable Notation at the class level

2017-12-09 Thread Aaron Hall via Python-Dev
I'm not a typing expert, but I want to second Raymond's concerns, and perhaps I'm qualified to do so as I gave the PyCon USA __slots__ talk this year and I have a highly voted answer describing them on Stack Overflow. Beautiful thing we're doing here with the dataclasses, by the way. I think ad

Re: [Python-Dev] Issues with PEP 526 Variable Notation at the class level

2017-12-09 Thread Ivan Levkivskyi
On 8 December 2017 at 19:28, Raymond Hettinger wrote: > > I'm hoping the typing experts will chime in here. The question is > straight-forward. Where should we look for the signature and docstring for > constructing instances? Should they be attached to the class, to > __init__(), or to __new_

Re: [Python-Dev] Issues with PEP 526 Variable Notation at the class level

2017-12-09 Thread Eric V. Smith
On 12/8/2017 9:14 PM, Nathaniel Smith wrote: On Dec 7, 2017 12:49, "Eric V. Smith" > wrote: The reason I didn't include it (as @dataclass(slots=True)) is because it has to return a new class, and the rest of the dataclass features just modifies the given cl