I have module foo, inside this module I dynamically created class:

def superClassCreator():
    return type("Bar", (object,), {})

Now, what I want to achieve is to make this new dynamic class visible as a class of this module:

import foo
dir(foo)
>>> [... 'Bar' ...]

Do you know how to do this?

Edit
Report