[Python-Dev] Adding NewType() to PEP 484
Guido van Rossum
gvanrossum at gmail.com
Sun May 29 19:55:50 EDT 2016
On Sun, May 29, 2016 at 4:08 PM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
>
> On 28 May 2016 00:03, "Guido van Rossum" <gvanrossum at gmail.com> wrote:
>>
>> Also -- the most important thing. :-) What to call these things? We're
>> pretty much settled on the semantics and how to create them (A =
>> NewType('A', int)) but what should we call types like A when we're
>> talking about them? "New types" sounds awkward.
>
> How about "nominal type" since the type is distinct only in name?
I believe that would be confusing because nominal type systems are a
different idea (https://en.wikipedia.org/wiki/Nominal_type_system).
--
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev
mailing list