Project

General

Profile

« Previous | Next » 

Revision 1446

csvs.py: Added csv modifications to compare Dialect instances

View differences:

csvs.py
24 24
    header = csv.reader(StringIO.StringIO(info.header_line),
25 25
        info.dialect).next()
26 26
    return (csv.reader(stream, info.dialect), header)
27

  
28
##### csv modifications
29

  
30
# Note that these methods only work on *instances* of Dialect classes
31
csv.Dialect.__eq__ = lambda self, other: self.__dict__ == other.__dict__
32
csv.Dialect.__ne__ = lambda self, other: not (self == other)

Also available in: Unified diff