On 31 May 2016 at 04:08, Steven D'Aprano email@example.com wrote:
T -> TypeVar() x -> Symbol() T -> type(bases, ns) Record -> namedtuple(fields)
The arrow seems back to front. It should point towards the name being assigned.
T <- TypeVar() x <- Symbol() T <- type(bases, ns) Record <- namedtuple(fields)
Also, if the RHS is going to be called as part of the <- operation, shouldn't the first two just be
T <- TypeVar x <- Symbol
The main drawback is that '<-' doesn't suggest in any way what's going on.
An alternative might be
def x = Symbol
since 'def' has the precedent of attaching the name being bound to the object being created.