Bugfixes for _serialize function in bitshift/parser/python.py