M
Maurice LING
Hi,
In normal circumstances, we know exactly which class to load and use
using compile time. But I am now faced with a situation whereby I need
to load a class differentially at runtime (the user can define which
class to load).
For example:
class a:
......
class b:
......
allowed = ['a', 'b']
'allowed' list will store the names of the alternative classes to use.
The alternative classes have the same set of methods but different
implementations.
How can I differentially use the classes at runtime?
Thanks
Maurice
In normal circumstances, we know exactly which class to load and use
using compile time. But I am now faced with a situation whereby I need
to load a class differentially at runtime (the user can define which
class to load).
For example:
class a:
......
class b:
......
allowed = ['a', 'b']
'allowed' list will store the names of the alternative classes to use.
The alternative classes have the same set of methods but different
implementations.
How can I differentially use the classes at runtime?
Thanks
Maurice