From: Jacob Lifshay Date: Wed, 14 Jun 2023 05:53:52 +0000 (-0700) Subject: cache get_csv X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84610562f8bb7fd9a26e1b70d5c79e120a35e2bf;p=openpower-isa.git cache get_csv --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 6e32fb99..fb90b135 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -40,6 +40,12 @@ def find_wiki_file(name): def get_csv(name): + retval = _get_csv(name) + return [i.copy() for i in retval] + + +@functools.lru_cache() +def _get_csv(name): """gets a not-entirely-csv-file-formatted database, which allows comments """ file_path = find_wiki_file(name)