I recently noticed that the docstring for the format_field() method in pymarc.Field says it will return "the field as a string w/ tag, indicators, and subfield indicators", but the code clearly doesn't return anything other than the Subfield.values for the input field.
Is this the desired behavior, or does the docstring indicate the desired behavior? I've updated format_field to show the missing items with examples shown below:
# Two test fields
record = Record()
f = Field(
tag="245",
indicators=["0", "1"],
subfields=[
Subfield(code="a", value="The pragmatic programmer : "),
Subfield(code="b", value="from journeyman to master /"),
Subfield(code="c", value="Andrew Hunt, David Thomas."),
],
)
fs = Field(
tag="650",
indicators=["0", "0"],
subfields=[
Subfield(code="a", value="Fentanyl"),
Subfield(code="x", value="Overdose"),
Subfield(code="z", value="United States"),
Subfield(code="x", value="Prevention"),
],
)
Title field @5.1.1:
The pragmatic programmer : from journeyman to master / Andrew Hunt, David Thomas.
Updated:
245 01$a The pragmatic programmer : $b from journeyman to master /$c Andrew Hunt, David Thomas.
Subject field @5.1.1:
Fentanyl -- Overdose -- United States -- Prevention
Updated:
650 00$a Fentanyl -- $x Overdose -- $z United States -- $x Prevention
What's the desired behavior?
Regards,
Ben W.