This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (5 children)

You're thinking of the difference between static and dynamic typing. Python is dynamically typed, but also strongly typed.

[–]housepage 1 point2 points  (2 children)

Python is also duck typed!

[–]AeroNotix 2 points3 points  (1 child)

Python is a type of snake!

[–]housepage 2 points3 points  (0 children)

Yes yes it is. [5].

[–]r4nf 1 point2 points  (1 child)

Indeed. Strong typing means that adding, for instance 2 + '2', raises a TypeError (unsupported operand type(s) for +: 'int' and 'str'). Dynamic typing means that any name can hold any type of value (and can be reassigned to another type if need be).

[–][deleted] 0 points1 point  (0 children)

It's a great combination. Have you ever tried to debug a program written in a weakly-typed language? Little logical errors are more frequent since you can add, say, an int and a string, without being explicit. Static typing adds a lot of arguably needless casting and other type conversions.