fixed python 3.4 compatibility issue

use __code__ instead of func_code