Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104232
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: How to get which attribute causes the AttributeError except inspecting strings? |
| Date | 2016-03-07 17:26 +0000 |
| Message-ID | <mailman.33.1457371807.10335.python-list@python.org> (permalink) |
| References | <be90a047-38ea-4108-adb8-17fd7483fee5@googlegroups.com> <mailman.15.1457347821.10335.python-list@python.org> <7915b82e-12f4-4652-999e-a1cfaca717b6@googlegroups.com> <56DDAE71.1030100@timgolden.me.uk> |
On 07/03/2016 16:38, Tim Golden wrote: > On 07/03/2016 16:25, Xiang Zhang wrote: >> Hi, >> >> I know I can get the attribute name in some way, but since I just >> want the attribute name when an AttributeError caused by it raised, I >> really don't want to inspect the string or introduce one more layer >> over getattr. I hope I can get the attribute which causes the >> exception from the AttributeError raised directly. But it seems I >> can't. >> > > As things stand, you can't. But if you were to chime in on this issue: > > https://bugs.python.org/issue18156 > > then you might bring discussion there back to life again and see some > forward movement. There seemed to be a consensus (and involving some > active developers) so it's possible that new interest might revive interest. > > TJG > Thanks, you saved me searching for the link that I knew existed :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
How to get which attribute causes the AttributeError except inspecting strings? ZhangXiang <zhangyangyu0614@gmail.com> - 2016-03-07 00:46 -0800
Re: How to get which attribute causes the AttributeError except inspecting strings? Peter Otten <__peter__@web.de> - 2016-03-07 10:48 +0100
Re: How to get which attribute causes the AttributeError except inspecting strings? Xiang Zhang <zhangyangyu0614@gmail.com> - 2016-03-07 02:15 -0800
Re: How to get which attribute causes the AttributeError except inspecting strings? jmp <jeanmichel@sequans.com> - 2016-03-07 11:50 +0100
Re: How to get which attribute causes the AttributeError except inspecting strings? Xiang Zhang <zhangyangyu0614@gmail.com> - 2016-03-07 08:25 -0800
Re: How to get which attribute causes the AttributeError except inspecting strings? Tim Golden <mail@timgolden.me.uk> - 2016-03-07 16:38 +0000
Re: How to get which attribute causes the AttributeError except inspecting strings? Xiang Zhang <zhangyangyu0614@gmail.com> - 2016-03-07 09:01 -0800
Re: How to get which attribute causes the AttributeError except inspecting strings? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-07 17:26 +0000
csiph-web