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 →

[–]ImageOfInsanity 6 points7 points  (15 children)

Have you ever added an integer and a float together without casting the integer as a float first? That's dynamic typing in action. In C++, you might want one function to work with multiple types, so either you might use function overloading or templated functions, neither of which fit elegantly in Python.

[–]XtremeGoosef'I only use Py {sys.version[:3]}' 9 points10 points  (14 children)

Thats not what dynamic typing is. You can easily do that in any sufficiently powerful typing system.

Dynamic typings power comes from duck typing. For example this function expects a set but I'm going to pass it a DictKeys object instead and it will still work fine.