quote: >>>> d = csv.Sniffer().sniff("1,2,3") >>>> def eq(a, b, attributes=[name for name in dir(d) if not > name.startswith("_")]): > ... return all(getattr(a, n, None) == getattr(b, n, None) for n in > attributes)
Only change I made is substituting "dir(csv.excel)" or "dir(csv.Dialect)" for "dir(d)", because I can't be always sure, that there'd be a nicely defined "d". Salute, Malte -- http://mail.python.org/mailman/listinfo/python-list