Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes
pymake.functions.Function Class Reference
Inheritance diagram for pymake.functions.Function:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def __getitem__
def setup
def append
def __len__

Public Attributes

 loc
 maxargs

Private Attributes

 _arguments

Static Private Attributes

tuple __slots__ = ('_arguments', 'loc')

Detailed Description

An object that represents a function call. This class is always subclassed
with the following methods and attributes:

minargs = minimum # of arguments
maxargs = maximum # of arguments (0 means unlimited)

def resolve(self, makefile, variables, fd, setting)
    Calls the function
    calls fd.write() with strings

Definition at line 12 of file functions.py.


Constructor & Destructor Documentation

def pymake.functions.Function.__init__ (   self,
  loc 
)

Definition at line 27 of file functions.py.

00027 
00028     def __init__(self, loc):
00029         self._arguments = []
00030         self.loc = loc
00031         assert self.minargs > 0


Member Function Documentation

def pymake.functions.Function.__getitem__ (   self,
  key 
)

Definition at line 32 of file functions.py.

00032 
00033     def __getitem__(self, key):
00034         return self._arguments[key]

Definition at line 47 of file functions.py.

00047 
00048     def __len__(self):
00049         return len(self._arguments)

def pymake.functions.Function.append (   self,
  arg 
)

Definition at line 43 of file functions.py.

00043 
00044     def append(self, arg):
00045         assert isinstance(arg, (data.Expansion, data.StringExpansion))
00046         self._arguments.append(arg)

Here is the caller graph for this function:

Reimplemented in pymake.functions.IfFunction, pymake.functions.SubstitutionRef, and pymake.functions.VariableRef.

Definition at line 35 of file functions.py.

00035 
00036     def setup(self):
00037         argc = len(self._arguments)
00038 
00039         if argc < self.minargs:
00040             raise data.DataError("Not enough arguments to function %s, requires %s" % (self.name, self.minargs), self.loc)
00041 
00042         assert self.maxargs == 0 or argc <= self.maxargs, "Parser screwed up, gave us too many args"


Member Data Documentation

tuple pymake.functions.Function.__slots__ = ('_arguments', 'loc') [static, private]

Definition at line 28 of file functions.py.

Reimplemented in pymake.functions.SubstitutionRef, and pymake.functions.VariableRef.

Definition at line 29 of file functions.py.


The documentation for this class was generated from the following file: