~anarchivist/pymarc/dev

Viewing all changes in revision 91.

  • Committer: Mark A. Matienzo
  • Date: 2009-11-11 05:11:00 UTC
  • Revision ID: mark@matienzo.org-20091111051100-acq3o8yacgvl44m6
Changes to Field and Record objects, with accompanying tests and test data to deal with non-numeric tags. The changes reflected are similar to how this was dealt with in ruby-marc.

- Modified Field.__init__() and Field.is_control_field() to assume that control fields are only numeric; added character type checking using Field.tag.isdigit() to make sure these comparisons were accurate.

- Modified Record.as_marc() do handle padding properly depending on whether the tag is fully numeric or not.

- Added new test to encode.py: test_encode_decode_alphatag(), and new test data, alphatag.dat.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: