20240418 Class type

Run Settings
LanguagePython
Language Version
Run Command
class Person: name : "Ryan" # {name : "Ryan"} age = 30 # age : 30 attribute, namespace def __init__(self, sex): self.sex = sex def greet(self): # greet : f() methode print("hello") print(type(Person)) print(Person.__name__) print(type(1)) p = Person("male") print(type(p)) print(p.__class__) print(isinstance(p,Person), isinstance(p,str)) # check the object from which class #help(type) print(isinstance(Person,Person)) print(Person.__dict__)
Editor Settings
Theme
Key bindings
Full width
Lines