def randitems(n, obj='ndarray', mode=None, char=None):
 if (mode is None):
  mode = choice(cap[obj][MODE])
 if (char is None):
  char = choice(tuple(fmtdict[mode]))
 multiplier = choice(cap[obj][MULT])
 fmt = ((mode + '#') + (char * int((multiplier if multiplier else 1))))
 items = gen_items(n, fmt, obj)
 item = gen_item(fmt, obj)
 fmt = ((mode.strip('amb') + multiplier) + char)
 return (fmt, items, item)

def randitems ( n , obj = 'ndarray' , mode = None , char = None ) : if ( mode is None ) : mode = choice ( cap [ obj ] [ MODE ] ) if ( char is None ) : char = choice ( tuple ( fmtdict [ mode ] ) ) multiplier = choice ( cap [ obj ] [ MULT ] ) fmt = ( ( mode + '#' ) + ( char * int ( ( multiplier if multiplier else 1 ) ) ) ) items = gen_items ( n , fmt , obj ) item = gen_item ( fmt , obj ) fmt = ( ( mode . strip ( 'amb' ) + multiplier ) + char ) return ( fmt , items , item )
return random format .