Package pytilities :: Package overloading
[hide private]
[frames] | no frames]

Source Code for Package pytilities.overloading

 1  # Copyright (C) 2010 Tim Diels <limyreth@users.sourceforge.net> 
 2  #  
 3  # This file is part of pytilities. 
 4  #  
 5  # pytilities is free software: you can redistribute it and/or modify 
 6  # it under the terms of the GNU General Public License as published by 
 7  # the Free Software Foundation, either version 3 of the License, or 
 8  # (at your option) any later version. 
 9  #  
10  # pytilities is distributed in the hope that it will be useful, 
11  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13  # GNU General Public License for more details. 
14  #  
15  # You should have received a copy of the GNU General Public License 
16  # along with pytilities.  If not, see <http://www.gnu.org/licenses/>. 
17  # 
18   
19  ''' 
20  Function overloading tools. 
21   
22  Classes: 
23   
24      `Parameter` 
25          A parameter of an operation. 
26   
27      `Param` 
28          Alias for `Parameter` 
29   
30      `CompositeParameter` 
31          `Parameter` that consists of more parameters. 
32   
33      `CompositeParam` 
34          Alias for `CompositeParameter` 
35   
36      `Overloader` 
37          A collection of `Overload`s that can process calls. 
38   
39      `Overload` 
40          An operation signature with an operation to call when arguments match. 
41   
42   
43  Decorators: 
44   
45      `overloaded` 
46          Overloads an operation. 
47  ''' 
48   
49  __docformat__ = 'reStructuredText' 
50   
51  from .parameter import Parameter, Param 
52  from .compositeparameter import CompositeParameter, CompositeParam 
53  from .overload import Overload 
54  from .overloader import Overloader 
55  from .decorators import overloaded 
56   
57  # Implementation note: we can't use overloaded(), etc. to do overloading in this  
58  # package. It would cause an infinite recursive loop 
59