I'm using Python 3.5 on Ubuntu. I modified this routine to show what I think it should be. Before it was flags = OP_FLAG_TERMCHAR_SET if a terminating char exists but was immediately followed by flags ...