~pythonregexp2.7/python/issue2636-01+09-01-01

« back to all changes in this revision

Viewing changes to Lib/_abcoll.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 00:02:12 UTC
  • mfrom: (39022.1.34 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922000212-7r0q4f4ugiq57jph
Merged in changes from the Atomic Grouping / Possessive Qualifiers branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
"""
10
10
 
11
11
from abc import ABCMeta, abstractmethod
 
12
import sys
12
13
 
13
14
__all__ = ["Hashable", "Iterable", "Iterator",
14
15
           "Sized", "Container", "Callable",
206
207
            other = self._from_iterable(other)
207
208
        return (self - other) | (other - self)
208
209
 
 
210
    # Sets are not hashable by default, but subclasses can change this
 
211
    __hash__ = None
 
212
 
209
213
    def _hash(self):
210
214
        """Compute the hash value of a set.
211
215
 
349
353
    def values(self):
350
354
        return [self[key] for key in self]
351
355
 
 
356
    # Mappings are not hashable by default, but subclasses can change this
 
357
    __hash__ = None
 
358
 
352
359
    def __eq__(self, other):
353
360
        return isinstance(other, Mapping) and \
354
361
               dict(self.items()) == dict(other.items())