[Libre-soc-bugs] [Bug 485] Create I-Cache from microwatt icache.vhdl

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Oct 8 19:36:18 BST 2020


--- Comment #63 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #61)
> (In reply to Cole Poirier from comment #60)
> > Got it. Out of curiosity and to be a better python programmer, why is this
> > bad practice?
> aside from needing totally different dictionaries, it's called a
> "singleton".  i.e. that dictionary is *shared between function calls*.
> i.e. you call the function once, make some changes, then call it again and
> despite expecting an entirely new fresh default dict argument, after many
> days of frustrating debugging go "wtf, this dictionary has been modified,
> wtf??"
> don't do it unless that is EXACTLY what you want and make absolutely sure
> that you comment the code saying "this is intentionally a singleton default
> dictionary" because it is a major source of really obscure bugs.

Aha! That makes a lot of sense, thanks for taking to time to explain it in

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

More information about the libre-soc-bugs mailing list