1. Victor Stinner
  2. hachoir


haypo  committed 24dc042

([wiki:broken broken]) Start to split GenericFieldSet

  • Participants
  • Parent commits a7ce761
  • Branches default

Comments (0)

Files changed (2)

File hachoir-core/hachoir_core/field/__init__.py

View file
  • Ignore whitespace
 # FieldSet classes
 from hachoir_core.field.fake_array import FakeArray
-from hachoir_core.field.generic_field_set import (GenericFieldSet,
+from hachoir_core.field.basic_field_set import (BasicFieldSet,
     ParserError, MatchError)
+from hachoir_core.field.generic_field_set import GenericFieldSet
 from hachoir_core.field.field_set import FieldSet
 from hachoir_core.field.float import Float32, Float64, Float80
 from hachoir_core.field.static_field_set import StaticFieldSet

File hachoir-core/hachoir_core/field/generic_field_set.py

View file
  • Ignore whitespace
-from hachoir_core.field import (Field, FieldError,
+from hachoir_core.field import (BasicFieldSet, Field, ParserError,
     createRawField, createNullField, createPaddingField, FakeArray)
 from hachoir_core.event_handler import EventHandler
 from hachoir_core.dict import Dict, UniqKeyError
 from hachoir_core.tools import lowerBound
 import hachoir_core.config as config
-class ParserError(FieldError):
-    """
-    Error raised by a L{GenericFieldSet} (or L{FieldSet}/L{Parser}).
-    @see: L{FieldError}
-    """
-    pass
-class MatchError(FieldError):
-    """
-    Error raised by a L{FieldSet} or a L{Parser} when the stream content
-    doesn't match to file format.
-    @see: L{FieldError}
-    """
-    pass
-class GenericFieldSet(Field):
+class GenericFieldSet(BasicFieldSet):
     Ordered list of fields. Use operator [] to access fields using their
     name (field names are unique in a field set, but not in the whole