edsu/pymarc — pull request #28 by dbs (2012-10-05 04:26:27+00:00)
Title: New methods for adding fields in grouped/ordered mode

* add_ordered_fields(*fields)
Adds one or more fields in strictly numeric order. For example, given
a record containing a 100, 260, and 650 field in that order, a 245 field
would be inserted between the 100 and 260 fields.

* add_grouped_fields(*fields)
Adds one or more fields in grouped numeric order, with new fields being
added at the end of their respective group. For example, given a record
containing a 100, 260, and 650 field in that order, a 245 field would be
inserted between the 260 and 650 fields. This behaviour hews closer to
the MARC standard for organization of records per
http://www.loc.gov/marc/96principl.html#five

Fields with alphanumeric tags simply get appended to the record.

Signed-off-by: Dan Scott