Achieves another 30% increase in trace header reading performance. (Forgotten file)

This commit is contained in:
Robert Smallshire
2015-05-06 10:39:31 +02:00
parent abf093bce2
commit b5af594716
+4 -1
View File
@@ -9,7 +9,10 @@ from segpy.util import underscores_to_camelcase, first_sentence, super_class
class Header:
"""An abstract base class for header format definitions."""
def __init__(self, **kwargs):
def __init__(self, *args, **kwargs):
for keyword, arg in zip(self.ordered_field_names(), args):
setattr(self, keyword, arg)
for keyword, arg in kwargs.items():
try:
getattr(self, keyword)