CLN: clean up parser options by cpcloud · Pull Request #5121 · pandas-dev/pandas (original) (raw)
Also add a test to make sure that the C parser options validation is actually
covered
example travis fail:
https://travis-ci.org/pydata/pandas/jobs/12171563
explanation (for the record):
if you print out options
before this commit you'll see that they are all overwritten with a single value. Whatever this value is will depend on how the _parser_defaults
dictionary happens to be ordered (which is random because of hashing).
This caused a bug because the value of value
is retained from the loop over _parser_defaults
, and default
is not reassigned in the two loops that follow the loop over _parser_defaults
, so all the values end up being the same as the last argument that was iterated over from _parser_defaults
.
magic explained 🎉