Dear stackoverflow-
My goal is to parse a class and return a data-structure (object, dictionary, etc) that is descriptive of the methods and the related parameters contained within the class. Bonus points for types and returns...
Requirements: Must be Python
For example, the below class:
class Foo:
def bar(hello=None):
return hello
def baz(world=None):
return baz
Would be parsed to return
result = {class:"Foo",
methods: [{name: "bar", params:["hello"]},
{name: "baz", params:["world"]}]}
So that's just an example of what I'm thinking... I'm really flexible on the data-structure.
Any ideas/examples on how to achieve this?