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 ...
You can create a release to package software, along with release notes and links to binary files, for other people to use. Learn more about releases in our docs.