Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Lib/weakref.py

    r2 r388  
    2121     ReferenceType)
    2222
     23from _weakrefset import WeakSet
     24
    2325from exceptions import ReferenceError
    2426
     
    2830__all__ = ["ref", "proxy", "getweakrefcount", "getweakrefs",
    2931           "WeakKeyDictionary", "ReferenceError", "ReferenceType", "ProxyType",
    30            "CallableProxyType", "ProxyTypes", "WeakValueDictionary"]
     32           "CallableProxyType", "ProxyTypes", "WeakValueDictionary", 'WeakSet']
    3133
    3234
     
    8486            if o is not None:
    8587                new[key] = o
     88        return new
     89
     90    __copy__ = copy
     91
     92    def __deepcopy__(self, memo):
     93        from copy import deepcopy
     94        new = self.__class__()
     95        for key, wr in self.data.items():
     96            o = wr()
     97            if o is not None:
     98                new[deepcopy(key, memo)] = o
    8699        return new
    87100
     
    257270        return new
    258271
     272    __copy__ = copy
     273
     274    def __deepcopy__(self, memo):
     275        from copy import deepcopy
     276        new = self.__class__()
     277        for key, value in self.data.items():
     278            o = key()
     279            if o is not None:
     280                new[o] = deepcopy(value, memo)
     281        return new
     282
    259283    def get(self, key, default=None):
    260284        return self.data.get(ref(key),default)
Note: See TracChangeset for help on using the changeset viewer.