Commit 75e7c3b4 authored by Vincent Pelletier's avatar Vincent Pelletier

Declare __slots__ .

Also, inherit from "object" as __slots__ are a new-style-class feature.
parent c6fab535
...@@ -438,7 +438,16 @@ Named Parameters: %r ...@@ -438,7 +438,16 @@ Named Parameters: %r
def getExecutionState(self): def getExecutionState(self):
return self.is_executed return self.is_executed
class Method: class Method(object):
__slots__ = (
'__portal_activities',
'__passive_self',
'__activity',
'__active_process',
'__kw',
'__method_id',
'__request',
)
def __init__(self, portal_activities, passive_self, activity, active_process, kw, method_id, request): def __init__(self, portal_activities, passive_self, activity, active_process, kw, method_id, request):
self.__portal_activities = portal_activities self.__portal_activities = portal_activities
...@@ -461,7 +470,15 @@ class Method: ...@@ -461,7 +470,15 @@ class Method:
allow_class(Method) allow_class(Method)
class ActiveWrapper: class ActiveWrapper(object):
__slots__ = (
'__portal_activities',
'__passive_self',
'__activity',
'__active_process',
'__kw',
'__request',
)
# Shortcut security lookup (avoid calling __getattr__) # Shortcut security lookup (avoid calling __getattr__)
__parent__ = None __parent__ = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment