摘要:
地址:http://docs.python.org/3/library/copy.htmlAssignment statements in Python do not copy objects, they create bindings between a target and an object. For collections that are mutable or contain mutable items, a copy is sometimes needed so one can change one copy without changing the other. This mod 阅读全文
摘要:
# filename: class_static.pyclass Parent: name = "I'm the parent" @staticmethod def print_name_by_static(): print(Parent.name) @classmethod def print_name_by_class(cls): print(cls.name)class Child(Parent): pass #(1) # name = "I'm the child" #(2)if __name__ == "__mai.. 阅读全文