May-23-2023, 02:30 AM
(This post was last modified: May-23-2023, 02:30 AM by deanhystad.)
You remapped quit.__repr__() to call quit(). Then you assign a variable (q) to reference quit. When you type globals() it prints q: q.__repr__(), but __repr__() now does quit() instead of returning a string. Boom! I mean, that is why typing "q" works, why wouldn't you expect the same thing for globals().