python - Does writing "Frame" as class paramter make the class into a frame, or does it just inherit from frame? -
in python, if write class someclass(frame): , mean someclass becomes frame, or inherit frame? can't find straight answer anywhere, every answer find vague.
i think you're confused - if instance of subclass, has of members of superclass(es) , can used in place. in real sense, instance of someclass both instance of someclass , instance of frame.
>>> class bar(foo): pass ... >>> bar = bar() >>> isinstance(bar, foo) true
Comments
Post a Comment