> Hm, I think it would be fine if there *was* no distinction. IOW if > > def foo(a: None) -> None: pass > > was indistinguishable from > > def foo(a): pass > > In fact I think I'd prefer it that way. Having an explicit way to say > "no type here, move along" sounds fine.
I'd like to urge against making None magical -- I don't see any reason for it. Instead, consider that if I say def foo(a: T1) -> T2: I am presumably going to accept an argument of type T1 or a type derived from T1, and return a result of type T2 or a type derived from T2. In which case, def foo(a): pass should be equivalent to def foo(a: object) -> object: pass and we don't need to recycle None for the purpose -- especially as ininstance(None,object) yields True and I presume that isn't going to change. _______________________________________________ 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