amend
Convert to python long depending on value (and not on type)
L issue
Patch for #309