forked from jan/fatamorgana
enable str() casts on NString and AString
This commit is contained in:
parent
e909aa958d
commit
d25f3f1598
@ -619,6 +619,9 @@ class NString:
|
|||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return '[N]' + self._string
|
return '[N]' + self._string
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self._string
|
||||||
|
|
||||||
|
|
||||||
def read_nstring(stream: io.BufferedIOBase) -> str:
|
def read_nstring(stream: io.BufferedIOBase) -> str:
|
||||||
"""
|
"""
|
||||||
@ -730,6 +733,9 @@ class AString:
|
|||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return '[A]' + self._string
|
return '[A]' + self._string
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self._string
|
||||||
|
|
||||||
|
|
||||||
def read_astring(stream: io.BufferedIOBase) -> str:
|
def read_astring(stream: io.BufferedIOBase) -> str:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user