Chance Ginger wrote:
> I am trying to write a tool to examine a function (I'd like it
> to work with pyc files only). So here are a few questions I 
> have; any pointers would be very welcome.
> 
> Can I determine the number of arguments required of a function?

See inspect.getargspec()

> Is there a way to detect is the function will throw an exception
> (I don't care under what conditions just that it is possible)?

If you mean something like Java's throws declaration, no, Python doesn't 
have that. Any function can raise an exception. IIUC even something as 
simple as
   def foo(): pass
can raise KeyboardInterrupt

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to