def validate_hatch(s):
 if (not isinstance(s, six.string_types)):
  raise ValueError(u'Hatch pattern must be a string')
 unknown = (set(s) - {u'\\', u'/', u'|', u'-', u'+', u'*', u'.', u'x', u'o', u'O'})
 if unknown:
  raise ValueError((u'Unknown hatch symbol(s): %s' % list(unknown)))
 return s

def validate_hatch ( s ) : if ( not isinstance ( s , six . string_types ) ) : raise ValueError ( u'Hatch pattern must be a string' ) unknown = ( set ( s ) - { u'\\' , u'/' , u'|' , u'-' , u'+' , u'*' , u'.' , u'x' , u'o' , u'O' } ) if unknown : raise ValueError ( ( u'Unknown hatch symbol(s): %s' % list ( unknown ) ) ) return s
validate a hatch pattern .