[Python-Dev] Adding NewType() to PEP 484

Guido van Rossum gvanrossum at gmail.com
Fri May 27 19:01:11 EDT 2016


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.

On Fri, May 27, 2016 at 12:54 PM, Guido van Rossum <gvanrossum at gmail.com> wrote:
> Sorry, this is more meant to be the start of a discussion about the proposed
> feature. And typing.py has its own upstream repo (like asyncio).
>
> --Guido (mobile)
>
> On May 27, 2016 12:52 PM, "Brett Cannon" <brett at python.org> wrote:
>>
>> Patches to Python's stdlib should go through bugs.python.org so it isn't
>> lost in email.
>>
>>
>> On Fri, May 27, 2016, 12:00 Ivan Levkivskyi <levkivskyi at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> It has been proposed to enhance the typing module with a NewType function
>>> that allows to define simple unique types with almost zero runtime
>>> overhead.
>>>
>>> The PR containing actual implementation and PEP 484 update is here:
>>> https://github.com/python/typing/pull/226
>>>
>>> Review comments are very welcome.
>>>
>>> Best regards,
>>> Ivan
>>> _______________________________________________
>>> Python-Dev mailing list
>>> Python-Dev at python.org
>>> https://mail.python.org/mailman/listinfo/python-dev
>>> Unsubscribe:
>>> https://mail.python.org/mailman/options/python-dev/brett%40python.org
>>
>>
>> _______________________________________________
>> Python-Dev mailing list
>> Python-Dev at python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>>
>



-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list