Quicker way than "try" and "except" ? - Python
- by RadiantHex
I'm often having code written as follows
try:
self.title = item.title().content.string
except AttributeError, e:
self.title = None
Is there a quicker way of dealing with this? a one-liner?