> On 03/12/2014 04:49 PM, Chris Angelico wrote: >> You can use hasattr() in place of AttributeError Is that true now? It used to be that hasattr swallowed all exceptions rather than just AttributeError making is a very dangerous weapon for anything (such as an orm or odb) that might do something interesting when you try and get an attribute from it. On 12/03/2014 21:37, Tres Seaver wrote: > I use: > > getattr(subject, attrname, default)? > > *all the time*. On this one, did anything ever come of making getattr have a default default of None? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4