Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/_threading_local.py

    r2 r391  
    156156        object.__setattr__(self, '_local__lock', RLock())
    157157
    158         if args or kw and (cls.__init__ is object.__init__):
     158        if (args or kw) and (cls.__init__ is object.__init__):
    159159            raise TypeError("Initialization arguments are not supported")
    160160
     
    196196
    197197    def __setattr__(self, name, value):
     198        if name == '__dict__':
     199            raise AttributeError(
     200                "%r object attribute '__dict__' is read-only"
     201                % self.__class__.__name__)
    198202        lock = object.__getattribute__(self, '_local__lock')
    199203        lock.acquire()
     
    205209
    206210    def __delattr__(self, name):
     211        if name == '__dict__':
     212            raise AttributeError(
     213                "%r object attribute '__dict__' is read-only"
     214                % self.__class__.__name__)
    207215        lock = object.__getattribute__(self, '_local__lock')
    208216        lock.acquire()
Note: See TracChangeset for help on using the changeset viewer.