Getting the Argument Names of Your Function

In Javascript:
This gives you the entire definition of the function as a string, with which you can parse to get the argument names, or in prototype.js you can just do:

In Python:

In Ruby, there is no easy way to do this, although there is A way, which involves setting a trace function on the function and then executing it to get at the local variables at execution time, see here.

blog comments powered by Disqus