quote:
> An implementation for the lazy
>
>>>> import csv
>>>> 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)
> ...
Wow, this is awesome. I'd never come up with something like this.
Will digg into it deeper as I implement it (code snippets like this need to
melt in order to effuse all their flavor ;), but want to thank you very much
in the first place! :)
Have a nice day everyone,
Malte
--
http://mail.python.org/mailman/listinfo/python-list