FAQ
I'm trying to figure out (or find an example) of polymorphism whereby I pass a commandline argument (a string) which comports to a class (in java, you would say that it comports to a given interface bu I don't know if there is such a thing in Python) then that class of that name, somehow gets intantiated from that string. This way, I can have similar classes, but have my program use various ones by simply changing the commandline argument.


Can anyone show me how this might be done in Python? Thanks.


-RVic

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 4 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedMay 24, '13 at 11:40a
activeMay 24, '13 at 8:23p
posts4
users3
websitepython.org

People

Translate

site design / logo © 2021 Grokbase