# Copyright (C) 2006, 2007, 2008  Andrey Golovizin
#
# This file is part of pybtex.
#
# pybtex is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# pybtex is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pybtex; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
# USA

class BibliographyData(object):
    def __init__(self):
        self.entries = {}
        self._preamble = []

    def add_to_preamble(self, s):
        self._preamble.append(s)

    def preamble(self):
        return ''.join(self._preamble)

@@ -872,16 +872,275 @@
 e = %5B%5D%0A%0A
+    def __eq__(self, other):%0A        if not isinstance(other, BibliographyData):%0A            return super(BibliographyData, self) == other%0A        return (%0A            self.entries == other.entries%0A            and self._preamble == other._preamble%0A        )%0A%0A
     def 

Add BibliographyData.__eq__() method.