相关疑难解决方法(0)

所有Python类都应该扩展对象吗?

我发现以下两项工作:

class Foo():
    def a(self):
        print "hello"

class Foo(object):
    def a(self):
        print "hello"
Run Code Online (Sandbox Code Playgroud)

所有Python类都应该扩展对象吗?没有扩展对象有任何潜在的问题吗?

python inheritance

120
推荐指数
3
解决办法
4万
查看次数

标签 统计

inheritance ×1

python ×1