Project

Profile

Help

Revision 8d408f2d

Added by Vincent Le Goff over 4 years ago

Add a simple caching system for the #play function

View differences:

src/sharp/function.py
32 32

  
33 33
    """The function class, parent of all SharpScript functions."""
34 34

  
35
    def __init__(self, engine, client, locals):
35
    def __init__(self, engine, client, sharp):
36 36
        self.engine = engine
37 37
        self.client = client
38
        self.locals = locals
38
        self.sharp_engine = sharp
39
        self.init()
40

  
41
    def init(self):
42
        """Another secondary constructor."""
43
        pass
39 44

  
40 45
    def run(self, *args, **kwargs):
41 46
        """Execute the function with arguments."""

Also available in: Unified diff