Zaxebo Yaxebo schrieb am 05.11.2014 um 19:35: > Sturla>>> Ok, so it is to guard against spelling errors? > > Yes, thats a real big problem, once . > > Others are sufferring from this too, as i mentioned in my original post > > Here are other people also requesting the similar thing: > http://stackoverflow.com/questions/613364/is-there-a-need-for-a-use-strict- > python-compiler > http://stackoverflow.com/questions/13425715/does-python-have-a-use-strict- > and-use-warnings-like-in-perl > http://stevesprogramming.blogspot.in/2013/03/why-python-needs-perls-use- > strict.html > http://bytes.com/topic/python/answers/632587-python-feature-request-explicit- > variable-declarations > > As cython already implements "cdef int a1","cdef double a2" type statements, > so implementing "cdef var a1" and optionally making their explicit > declaration on, should be a do-able thing.
This has come up a couple of times before, so there are certainly some people who would benefit from a directive that enables warnings specifically about inferred Python object variables. > This "explcit declaration of variables - on" can be made by the programmer - > either by "cython.option_strict(True)" or by some command line option to > cython. A directive, see Options.py. There are already two directives called "warn.undeclared" and "infer_types.verbose". Combining those should get close to what you are looking for. Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel