Basically, I tried to change the python as little as possible, when python syntax worked in ruby too. So those lines are directly from python, multi-lines, 'and' instead of '&&', and all:

https://github.com/edsu/pymarc/blob/master/pymarc/marc8.py?source=c#L62

I suppose now that it's there and there are tests, it could be refactored to be more idiomatic ruby. But I'm not too concerned with doing so. 

But maybe some theoretical benefits of leaving it, where possible, a line-by-line port of the python, in case bugs are found in one or whatever?