"Alf P. Steinbach" <al...@start.no> wrote: > I'm not sure I like your idea of introducing static typing to increase > speed, but it could be done without introducing new syntax simply by > defining a special meaning to such annotation expressions that are > 'type' invocations, say, then like > > def speed( dist: type( float ), time: type( float ) ) -> type( > float ) >
That would be particularly useless: >>> type(float) is type True So your declaration is identical to: def speed(dist: type, time: type) -> type: Much better just to stick to something like: def speed( dist: float, time: float ) -> float: where at least you can tell from the annotations what types were actually used. -- http://mail.python.org/mailman/listinfo/python-list