"Maxim Loginov" <[EMAIL PROTECTED]> wrote > my problem is: I have (for example) 2 sets of quantity set(A,B,C) or > set(A,B,D). I need to calculate another quantity E which is function > of A,B,C or A,F. but F in turn is function of (A,B,D). ... > In reality dependecies of > course deeper sets are longer and data are very big arrays ... > I will need a function indirectly depending on already > existed.
I'm not sure whether it applies or not but one approach would be to use a dictionary where the keys are the required data sets and the values are the functions. Another approach is to use higher order functions that can analyse the input data set and generate a function capable of processing it. A third option might enable the use of OOP and polymorphism, provided the data can be categorized into a Liskoff compliant type heirarchy. Unfortunately its difficult to be sure without a lot more detail about the rules, the size of data and the types of data. Alan G _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor