Skip to content

Instantly share code, notes, and snippets.

@Vasanth375
Last active January 21, 2023 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vasanth375/b782af0d319f8be8632ace7ec74f46e3 to your computer and use it in GitHub Desktop.
Save Vasanth375/b782af0d319f8be8632ace7ec74f46e3 to your computer and use it in GitHub Desktop.
class MyClass:
def __init__(self):
self.x = 5
self.y = 10
obj = MyClass()
dir(obj)
# ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'x', 'y']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment