python value reference in func