From d25f3f15986afd31bff8b52ab9d0f6f4a5448a65 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 19 May 2020 00:21:23 -0700 Subject: [PATCH] enable str() casts on NString and AString --- fatamorgana/basic.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fatamorgana/basic.py b/fatamorgana/basic.py index 17de875..e2b9266 100644 --- a/fatamorgana/basic.py +++ b/fatamorgana/basic.py @@ -619,6 +619,9 @@ class NString: def __repr__(self) -> str: return '[N]' + self._string + def __str__(self) -> str: + return self._string + def read_nstring(stream: io.BufferedIOBase) -> str: """ @@ -730,6 +733,9 @@ class AString: def __repr__(self) -> str: return '[A]' + self._string + def __str__(self) -> str: + return self._string + def read_astring(stream: io.BufferedIOBase) -> str: """