> FWIW, when I had a similar challenge for dynamic coding, I just
> generated a py file and then imported it.  This technique was nice
> because can also work with Pyrex or Psyco.
>

I guess this is not much different than using exec, at the conceptual
level. exec is perhaps more suitable when you really need just one
function at a time and not a whole file of related functions.

> Also, the code above can be simplified to:  get_counter = lambda
> packet: packet[5:1:-1]
>

OK, but that was just a demonstration. The actual functions are
complex enough to not fit into a single expression.

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

Reply via email to