Is Python strongly typed?

后端 未结 11 1369
长发绾君心
长发绾君心 2020-11-22 17:12

I\'ve come across links that say Python is a strongly typed language.

However, I thought in strongly typed languages you couldn\'t do this:

bob = 1
b         


        
11条回答
  •  悲&欢浪女
    2020-11-22 17:21

    According to this wiki Python article Python is both dynamically and strongly typed (provides a good explanation too).

    Perhaps you are thinking about statically typed languages where types can not change during program execution and type checking occurs during compile time to detect possible errors.

    This SO question might be of interest: Dynamic type languages versus static type languages and this Wikipedia article on Type Systems provides more information

提交回复
热议问题