Class with Object as a parameter

前端 未结 6 1973
攒了一身酷
攒了一身酷 2020-12-22 17:23

I\'m trying to translate some python code to scala code. So I\'m a total noob in Python.

But why do some classes have object as a parameter but never explicitly use

6条回答
  •  遥遥无期
    2020-12-22 17:55

    class Table and class Table(object) are no different for Python.

    It's not a parameter, its extending from object (which is base Class like many other languages).

    All it says is that it inherits whatever is defined in "object". This is the default behaviour.

提交回复
热议问题