greg ha escrito: > Juan R. wrote: > > > I see no dinamism on your example, just static overloading. > > There's nothing static about it: > > q = raw_input() > if q == "A": > a = 1 > b = 2 > else: > a = "x" > b = "y" > c = a + b > > There is no way that the compiler can statically > determine what the + operator needs to do here.
Before or after the input? :] No, it is not that i did mean. Of course, the operation for c is dinamic, but just statically overloading the +. The definition for c could be adapted to the cases and introduced on the if. I would call dinamic code, for instance, if the if, the different cases and the def for c could be modified on the fly _รก la_ LISP macro style.
-- http://mail.python.org/mailman/listinfo/python-list