Write a Python function called dir dict(obj, raise exc=False) that returns a plain dict mapping every…
Write a Python function called dir dict(obj, raise exc=False) that returns a plain dict mapping every…: a task in repo2rlenv-r2e (Harbor dataset). Behavior requirements: - The set of attribute names to inspect must be exactly those returned by the built-in dir(obj) call, which includes names…
The task
Behavior requirements: - The set of attribute names to inspect must be exactly those returned by the built-in `dir(obj)` call, which includes names inherited from parent classes, metaclasses, and built-in types — not just the names in `obj.__dict__`. - Each name must be resolved with the equivalent of `getattr(obj,…
Part of FineEnvs/repo2rlenv-r2e.