Ben Finney <ben+pyt...@benfinney.id.au> writes: > logger.error( > '{0} could not be stored - {1}'.format( > (self.preset_file, sys.exc_info()[1])) > > I usually prefer to use named placeholders instead of positional, but > this duplicates your original.
Ah, I see that the OP *did* use named placeholders. So, even better: logger.error( '{file} could not be stored - {error}'.format( file=self.preset_file, error=sys.exc_info()[1])) -- \ “Those who write software only for pay should go hurt some | `\ other field.” —Erik Naggum, in _gnu.misc.discuss_ | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list