Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes: > Thoughts and feedback? Please vote: a module global, or a flag on the > object? Please give reasons, and remember that the function is intended > for interactive use.
Both are bad. More state to remember, ugh. Instead have separate entry points for filtering or not filtering the dunders. Something like: edir(obj) = no dunders edir_(obj) = dunders. If you also support the keyword arg, then you could have edir_(obj)=functools.partial(edir,dunders=True). -- https://mail.python.org/mailman/listinfo/python-list