What is the difference between PyPy and Python? are there lot of differences?

sturlamolden sturlamolden at yahoo.no
Wed Jul 13 17:03:19 CEST 2011


On 13 Jul, 16:06, ArrC <justmailnav... at gmail.com> wrote:

> And they also talked about the lack of type check in python.
>
> So, how does it help (strongly typed) in debugging?


Python is strongly typed. There are no static type checks in Python.
Type checks are done at runtime. Dynamic typing does not mean that
Python is a weakly typed language.

The question of debugging is often raised, particularly by Java heads:

In Python, the "doctest" and "unittest" modules can be used to verify
that code works according to specification (e.g. trap type errors),
and are common alternatives to static type checks.

http://docs.python.org/release/3.2/library/doctest.html
http://docs.python.org/release/3.2/library/unittest.html

It is a good practice to always write tests for your code.

Python 3.x also has function argument and return value type
annotations, which is a further guard against type errors:

http://www.python.org/dev/peps/pep-3107/


Sturla




More information about the Python-list mailing list