On Dec 14, 2007 12:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Luis N wrote: > > Is there a way to introspect a function or class' required arguments, > > particularly keyword arguments? > > See inspect.getargspec() and formatargspec(). > Look at the source if you want details of where the info is stored.
Thanks that's exactly what I was looking for :-) > > I can easily use a dictionary since it is my own function that I wish > > to introspect. I haven't tested the below code yet, but e.g. > > I don't understand what you are trying to do here. The code I posted before is to be part of a dispatcher for a django application. Objects are routed to 'add', 'edit', or 'delete' methods. Data for some of the fields/attributes of my django models objects needs to be preprocessed. However, as the add/edit/delete methods are used for multiple objects I need to determine dynamically if a particular preprocessor needs to be called. > Kent > Thanks again, Luis _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor