On Wed, Feb 11, 2015 at 8:45 AM, Dave Angel <[email protected]> wrote: > On 02/11/2015 08:27 AM, boB Stepp wrote: [...] > > Sure, it's viable, but the best approach depends on your goal (use case), > and your restrictions. Are these functions really totally unrelated to each > other? You not only don't have the same number of arguments, but the values > don't even have anything in common?
The file/module containing functions extract information from another software application (with its own scripting language) and ask that software to perform certain calculations in its scripting language. The dictionary keys are conventional symbols for types of calculations that someone might request. I have a current set of requested calculations, but this will likely be augmented with new ones in the future. Depending on the request, there might be no arguments passed, meaning there is a simple request for information from the software application that requires only a look-up, or the actual software application may have to do calculations requiring one or more passed values. Which and how many values depends on the type of calculation requested. > There's an implied constraint that you're not permitted to change the > functions. Are you really constrained to only change the caller? I think this is the case, but I am open to other ideas. > Assuming that you seriously want to be able to do this, the only use case I > can imagine are: > 1) you're writing an interpreter I was not thinking explicitly in this way, but in effect I am translating requests in Python code into a proprietary scripting language, and vice versa. [...] > In each case, there are probably better ways... I am open to suggestions! Thanks! -- boB _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
