Metaclass question

Peter Hansen peter at
Wed Mar 12 20:29:35 CET 2003

Bojiro Kafir Tsava wrote:
> I need to achieve transparent import/instantiation of classes and modules.
> Here's a summary
> When I do:
> import
> should result in creation of a new python class "" which
> has a constructor:
> class MyClass:
>     def __init__(self, *args):
>         self.extObj =, "MyClass")

Can you explain *why* you need it to work in exactly this way?  Better
yet, explain what you are really trying to achieve, without reference
to the specific means of achieving it which you think you need.  Doing
what you ask seems unlikely to be the simplest way of getting to the
real goal.


More information about the Python-list mailing list