I want to serialize a function using its pointer. For example >>> s = """ ... def square(number): ... return number**2 ... """ >>> functions = {} >>> exec s in functions >>> f = functions['square'] >>> f <function square at 0xb7b5d10c>
Then, 1. Serialize f, 2. Store it into a file a db. One day later, 3. Retrieve from file or db, 4. Unserialize it 5. Use as it is a normal function, maybe I would set it to an object with setattr Any help will be very useful. Mike -- http://mail.python.org/mailman/listinfo/python-list