Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get attributes of class

import inspect

class myclass:
  a = 5
  def method(b):
    return b

for i in inspect.getmembers(myclass):
  print(i)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #attributes #class
ADD COMMENT
Topic
Name
1+2 =