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

cs at zip.com.au cs at zip.com.au
Sat May 28 19:24:23 EDT 2016


On 28May2016 08:19, Steve Dower <steve.dower at python.org> wrote:

Did anyone suggest "distinct type alias"?

Regardless of what name, I'm fairly sure people will call it whatever the function to create it is called. So if the function is typings.distinguishtype(...), then distinguished will stick.

Just casting an opinion in support of Greg Ewing's remark: I don't think we should use the word "alias", regardless of what else is used.

In <5748FB66.7090107 at canterbury.ac.nz>, Greg said:

Steven D'Aprano wrote:

TypeAlias? Because A is an alias for int? That suggests it's just another name for the same type, but it's not. It's a distinct type as far as the static type checker is concerned

and I agree entirely.

Cheers, Cameron Simpson <cs at zip.com.au>



More information about the Python-Dev mailing list