Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104229
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2016-03-07 09:01 -0800 |
| References | <be90a047-38ea-4108-adb8-17fd7483fee5@googlegroups.com> <mailman.15.1457347821.10335.python-list@python.org> <7915b82e-12f4-4652-999e-a1cfaca717b6@googlegroups.com> <mailman.27.1457368693.10335.python-list@python.org> |
| Message-ID | <1db91516-ecae-4e73-adb5-78d6b728e7d8@googlegroups.com> (permalink) |
| Subject | Re: How to get which attribute causes the AttributeError except inspecting strings? |
| From | Xiang Zhang <zhangyangyu0614@gmail.com> |
On Tuesday, March 8, 2016 at 12:38:31 AM UTC+8, 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 for mentioning the issue. I'll ping it to see if there is still anyone interested in it.
Back to comp.lang.python | Previous | Next — Previous in thread | Next 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