[issue22716] Add reference to the object missing an attribute to AttributeError

flying sheep report at bugs.python.org
Fri Oct 24 17:02:59 CEST 2014


New submission from flying sheep:

Trying to replicate a Ruby Gem that raises a “did you mean” error when mistyping a method name, I hit a showstopper:

There seems to be no way to get the object which misses an attribute from an AttributeError.

I propose the appended patch (it might be completely broken because I’m not experienced in the Python C API, but I tried)

----------
components: Interpreter Core
files: attribute_error_origin.patch
keywords: patch
messages: 229923
nosy: flying sheep
priority: normal
severity: normal
status: open
title: Add reference to the object missing an attribute to AttributeError
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file37004/attribute_error_origin.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22716>
_______________________________________


More information about the Python-bugs-list mailing list