[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Jun 9 23:03:55 BST 2023


--- Comment #73 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #70)
> Meanwhile I've added a functionality to walk over classes in a generic way.
> Something intermediate between classmethod decorator and usual method, with
> the except that the newly added decorator can accept either class or
> instance.
> Example:
> >>> print(tuple(Record.walk()))
> (<class 'openpower.insndb.core.String'>, <class

NICE! (correction: frickin awesome)  is the hierarchy preserved?
Record.walk() isn't going recursively down the other classes, is it?
hang on let me check...

class Record(Dataclass):
    name: String
    section: Section
    ppc: PPCRecord
    fields: Fields
    mdwn: MarkdownRecord
    svp64: SVP64Record = None

ha! cool!

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list