diff --git a/django/django/db/models/expressions.py b/django/django/db/models/expressions.py
index e54aaba..d4b9c3f 100644
a
|
b
|
class ExpressionNode(tree.Node):
|
7 | 7 | """ |
8 | 8 | Base class for all query expressions. |
9 | 9 | """ |
| 10 | __slots__ = () |
| 11 | |
10 | 12 | # Arithmetic connectors |
11 | 13 | ADD = '+' |
12 | 14 | SUB = '-' |
… |
… |
class F(ExpressionNode):
|
97 | 99 | """ |
98 | 100 | An expression representing the value of the given field. |
99 | 101 | """ |
| 102 | __slots__ = ('name',) |
| 103 | |
100 | 104 | def __init__(self, name): |
101 | 105 | super(F, self).__init__(None, None, False) |
102 | 106 | self.name = name |
diff --git a/django/django/db/models/query_utils.py b/django/django/db/models/query_utils.py
index 6a6b690..66ac5eb 100644
a
|
b
|
class Q(tree.Node):
|
140 | 140 | Encapsulates filters as objects that can then be combined logically (using |
141 | 141 | & and |). |
142 | 142 | """ |
| 143 | __slots__ = () |
| 144 | |
143 | 145 | # Connection types |
144 | 146 | AND = 'AND' |
145 | 147 | OR = 'OR' |
diff --git a/django/django/db/models/sql/where.py b/django/django/db/models/sql/where.py
index ec0545c..6f55d63 100644
a
|
b
|
class WhereNode(tree.Node):
|
32 | 32 | params]. However, a child could also be any class with as_sql() and |
33 | 33 | relabel_aliases() methods. |
34 | 34 | """ |
| 35 | __slots__ = () |
| 36 | |
35 | 37 | default = AND |
36 | 38 | |
37 | 39 | def add(self, data, connector): |
diff --git a/django/django/http/__init__.py b/django/django/http/__init__.py
index 683212f..e2e8b67 100644
a
|
b
|
class QueryDict(MultiValueDict):
|
131 | 131 | Values retrieved from this class are converted from the given encoding |
132 | 132 | (DEFAULT_CHARSET by default) to unicode. |
133 | 133 | """ |
| 134 | __slots__ = ('_mutable', '_encoding') |
| 135 | |
134 | 136 | # These are both reset in __init__, but is specified here at the class |
135 | 137 | # level so that unpickling will have valid values |
136 | 138 | _mutable = True |
diff --git a/django/django/utils/datastructures.py b/django/django/utils/datastructures.py
index 85cdd44..3dc73ab 100644
a
|
b
|
class MergeDict(object):
|
6 | 6 | If a key appears in more than one of the given dictionaries, only the |
7 | 7 | first occurrence will be used. |
8 | 8 | """ |
| 9 | __slots__ = ('dicts',) |
| 10 | |
9 | 11 | def __init__(self, *dicts): |
10 | 12 | self.dicts = dicts |
11 | 13 | |
… |
… |
class SortedDict(dict):
|
54 | 56 | """ |
55 | 57 | A dictionary that keeps its keys in the order in which they're inserted. |
56 | 58 | """ |
| 59 | __slots__ = ('keyOrder',) |
| 60 | |
57 | 61 | def __new__(cls, *args, **kwargs): |
58 | 62 | instance = super(SortedDict, cls).__new__(cls, *args, **kwargs) |
59 | 63 | instance.keyOrder = [] |
… |
… |
class MultiValueDict(dict):
|
185 | 189 | which returns a list for every key, even though most Web forms submit |
186 | 190 | single name-value pairs. |
187 | 191 | """ |
| 192 | __slots__ = () |
| 193 | |
188 | 194 | def __init__(self, key_to_list_mapping=()): |
189 | 195 | super(MultiValueDict, self).__init__(key_to_list_mapping) |
190 | 196 | |
… |
… |
class DotExpandedDict(dict):
|
353 | 359 | >>> DotExpandedDict({'c.1': 2, 'c.2': 3, 'c': 1}) |
354 | 360 | {'c': 1} |
355 | 361 | """ |
| 362 | __slots__ = () |
| 363 | |
356 | 364 | def __init__(self, key_to_list_mapping): |
357 | 365 | for k, v in key_to_list_mapping.items(): |
358 | 366 | current = self |
… |
… |
class ImmutableList(tuple):
|
377 | 385 | ... |
378 | 386 | AttributeError: You cannot mutate this. |
379 | 387 | """ |
| 388 | __slots__ = () |
380 | 389 | |
381 | 390 | def __new__(cls, *args, **kwargs): |
382 | 391 | if 'warning' in kwargs: |
… |
… |
class DictWrapper(dict):
|
418 | 427 | Used by the SQL construction code to ensure that values are correctly |
419 | 428 | quoted before being used. |
420 | 429 | """ |
| 430 | __slots__ = ('func', 'prefix') |
| 431 | |
421 | 432 | def __init__(self, data, func, prefix): |
422 | 433 | super(DictWrapper, self).__init__(data) |
423 | 434 | self.func = func |
diff --git a/django/django/utils/tree.py b/django/django/utils/tree.py
index 8894214..0fbc9b8 100644
a
|
b
|
class Node(object):
|
11 | 11 | connection (the root) with the children being either leaf nodes or other |
12 | 12 | Node instances. |
13 | 13 | """ |
| 14 | __slots__ = ('children', 'connector', 'subtree_parents', 'negated') |
| 15 | |
14 | 16 | # Standard connector type. Clients usually won't use this at all and |
15 | 17 | # subclasses will usually override the value. |
16 | 18 | default = 'DEFAULT' |