Every so often Guido talks about adding optional typing to python. Adaptation may offer the cleanest way to do this.
Turning def fn(a, b, c="default"): ... into any of def fn(Seq a, Index b, Text c="default"): ... def fn(Seq(a), Index(b), Text(c)="default"): ... or (wrapped version) def fn(Seq a, Index b, Text c="default"): ... doesn't seem so awful. (I'm not sure it is a net positive for readability, but I'm also not sure it isn't.) I read the type information as "normally this is just an assertion, but I suppose some protocols might *make* it true for me." -jJ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com