Jacek Generowicz schrieb:
You also gain not having to clutter your code with all the type
declarations. And you gain not having to decide what types you will
use too early on in development.
But it can be useful to restrict type variety in certain situations
e.g. prime number calculation :) And it would probably also be useful
to check violations of restrictions before running the program in
normal mode.
This must not necessarily mean 'int this, float that'. E.g. the
following would be nice:
a := some_type_value # "type fixing" assignment
a = other_type_value # error: a is restricted to some_type
a := yet_another_type_value # OK, another fixed type is set
del a # release type restriction; a can be recreated in normal
# dynamic mode
The type fixing assignment could be used for optimization and for
checking the program with pychecker.
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
--
http://mail.python.org/mailman/listinfo/python-list