[Python-ideas] Short form for keyword arguments and dicts

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jun 25 10:15:35 CEST 2013


Stephen J. Turnbull wrote:
> Ah, but here we have the case of two *different* names that are
> spelled the same[1], and what Steven is pointing out is that for this
> syntax to work, these different names that are spelled the same must
> stay in sync.

I dispute that they're different names. In the use cases
I have in mind, it's no accident that the two names are
spelled the same, because conceptually they represent the
very same thing. Giving them different names would be
confusing and probably indicate an error.

If the names were only accidentally the same, I would
probably want to rename one of them to avoid giving the
misleading impression that they were related.

> Amusingly
> enough, there is a Stephen J. Turnbull who is a well-known expert on
> Japanese history, especially military history. Nice guy, no relation,
> never met in real space, so no confusion for us, no need for =Stephen
> syntax. But it confuses the heck out of ninja fanatics. ;-)

That's quite a different situation -- these two Stephens
really are different, and if they ever had to coexist in
the same namespace, they would need to be given different
names, e.g. StephenTheHistorian and StephenTheNinjaConfuser.
And you would want to avoid assigning one to the other.

-- 
Greg


More information about the Python-ideas mailing list