From f43c33b0d75da1c673856f48e77c9501ac913c50 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 18 Apr 2021 09:42:27 +0200 Subject: [PATCH] added __repr__ to MemoryFlags --- riscemu/Executable.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/riscemu/Executable.py b/riscemu/Executable.py index 887dfd0..33c8990 100644 --- a/riscemu/Executable.py +++ b/riscemu/Executable.py @@ -14,6 +14,13 @@ class MemoryFlags: read_only: bool executable: bool + def __repr__(self): + return "{}({},{})".format( + self.__class__.__name__, + 'ro' if self.read_only else 'rw', + 'x' if self.executable else '-' + ) + @dataclass class MemorySection: