py: more debug info when assert failure