FAQ
Hi,

I'm a Python beginner and I'm would like to write a function that
returns a class (perhaps a tad ambitious...). I've looked through
the FAQ and perused "Python In A Nutshell" (not a good book to
start with?). The only example I found in PiaN used a simple
if statement to return one of a selection of pre-existing classes.
I'd like to generate a class on-the-fly from a parameter (a dictionary).
Can Python do this sort of stuff? Does the mean I have to mess with
the dreaded meta-classes?

thanks for any help anyone can give.


--
Nick Keighley

It's always September. But sometimes it is _more_ September.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 7 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedAug 20, '03 at 8:15a
activeAug 22, '03 at 12:07p
posts7
users6
websitepython.org

People

Translate

site design / logo © 2022 Grokbase