Consider the % operator, eg:
'All %(a)s eat %(b)s' % {'a':'cows', 'b':'grass'}
If the dictionary doesn't have all the relevant keys, an error
occurs. Is it possible for me to change the behaviour of this so that
if a key doesn't occur a default value of '' is assumed?
--
Phil Hunt....philh@vision25.demon.co.uk
'All %(a)s eat %(b)s' % {'a':'cows', 'b':'grass'}
If the dictionary doesn't have all the relevant keys, an error
occurs. Is it possible for me to change the behaviour of this so that
if a key doesn't occur a default value of '' is assumed?
--
Phil Hunt....philh@vision25.demon.co.uk