From 535535a45e0a5a0d730b217cec1cba75ce18a948 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 25 Apr 2007 07:25:22 +0000 Subject: [PATCH] Removed a bunch of annoying trailing whitespace. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5068 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/cache.py | 2 +- django/utils/datastructures.py | 12 ++++++------ django/utils/synch.py | 15 +++++++-------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/django/utils/cache.py b/django/utils/cache.py index 5eba302ebe8..c8031a409a6 100644 --- a/django/utils/cache.py +++ b/django/utils/cache.py @@ -86,7 +86,7 @@ def patch_response_headers(response, cache_timeout=None): def add_never_cache_headers(response): """ - Add headers to a response to indicate that + Add headers to a response to indicate that a page should never be cached. """ patch_response_headers(response, cache_timeout=-1) diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index dbf8660c75a..2b19c06dfb1 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -16,9 +16,9 @@ class MergeDict(object): def __contains__(self, key): return self.has_key(key) - - def __copy__(self): - return self.__class__(*self.dicts) + + def __copy__(self): + return self.__class__(*self.dicts) def get(self, key, default=None): try: @@ -45,9 +45,9 @@ class MergeDict(object): if dict.has_key(key): return True return False - - def copy(self): - """ returns a copy of this object""" + + def copy(self): + """ returns a copy of this object""" return self.__copy__() class SortedDict(dict): diff --git a/django/utils/synch.py b/django/utils/synch.py index 6fcd81390e6..2e808c1e01d 100644 --- a/django/utils/synch.py +++ b/django/utils/synch.py @@ -1,6 +1,6 @@ """ Synchronization primitives: - + - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) @@ -14,17 +14,16 @@ except ImportError: class RWLock: """ Classic implementation of reader-writer lock with preference to writers. - + Readers can access a resource simultaneously. Writers get an exclusive access. - + API is self-descriptive: reader_enters() reader_leaves() writer_enters() writer_leaves() """ - def __init__(self): self.mutex = threading.RLock() self.can_read = threading.Semaphore(0) @@ -33,7 +32,7 @@ class RWLock: self.active_writers = 0 self.waiting_readers = 0 self.waiting_writers = 0 - + def reader_enters(self): self.mutex.acquire() try: @@ -45,7 +44,7 @@ class RWLock: finally: self.mutex.release() self.can_read.acquire() - + def reader_leaves(self): self.mutex.acquire() try: @@ -56,7 +55,7 @@ class RWLock: self.can_write.release() finally: self.mutex.release() - + def writer_enters(self): self.mutex.acquire() try: @@ -68,7 +67,7 @@ class RWLock: finally: self.mutex.release() self.can_write.acquire() - + def writer_leaves(self): self.mutex.acquire() try: