semantics Package ================= .. contents:: Contents :local: :mod:`semantics` Package ------------------------ .. automodule:: nbtparse.semantics :members: :undoc-members: :show-inheritance: :mod:`fields` Module -------------------- .. automodule:: nbtparse.semantics.fields :members: :undoc-members: :show-inheritance: Sentinel values ^^^^^^^^^^^^^^^ Some of the field classes can accept sentinel values as defaults or in other places. .. note:: These sentinel values are only usable in the specific contexts they support (for example, as default values). They are *not* interpreted by :meth:`__set__` or in any other contexts. In other words, this is illegal:: >>> foo.timestamp = NOW # Use datetime.now(timezone.utc) >>> foo.uuid = NEW_UUID # Use uuid.uuid4() But you can do this:: class Foo(NBTObject): timestamp = UTCField('timestamp', default=NOW) uuid = UUIDField('uuid1', 'uuid2', default=NEW_UUID) .. autodata:: SELF_REFERENCE :annotation: .. autodata:: NOW :annotation: .. autodata:: NEW_UUID :annotation: :mod:`filetype` Module ---------------------- .. automodule:: nbtparse.semantics.filetype :members: :undoc-members: :show-inheritance: :mod:`nbtobject` Module ----------------------- .. automodule:: nbtparse.semantics.nbtobject :members: :undoc-members: :show-inheritance: