The Python documentation shows use of NewType like this:
import typing
foo = typing.NewType('foo', int)
some_id = foo(524313)
I don't understand exactly what the syntax is doing. How does that differ from this:
import typing
bar = typing.NewType('foo', int)
some_id = bar(524313)
What are the consequences of 'foo' != 'bar' in the source above?
Or, maybe worse:
import typing
bar = typing.NewType('foo', int)
some_id = foo(524313)