Home | Trees | Indices | Help |
|
---|
|
1 ## Copyright (C) 2008 Ben Smith <benjamin.coder.smith@gmail.com> 2 3 ## This file is part of pyctags. 4 5 ## pyctags is free software: you can redistribute it and/or modify 6 ## it under the terms of the GNU Lesser General Public License as published 7 ## by the Free Software Foundation, either version 3 of the License, or 8 ## (at your option) any later version. 9 10 ## pyctags 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 Lesser General Public License 16 ## and the GNU Lesser General Public Licens along with pyctags. If not, 17 ## see <http://www.gnu.org/licenses/>. 18 19 20 """ 21 A simple validator to make sure keyword arguments are valid. 22 """ 23 3335 """ 36 Used to validate arguments. 37 """49 50 the_validator = kwargs_validator() 5139 """ 40 @param args: arguments to check for validity. 41 @type args: iterable 42 @param allowed_args: list of valid arguments. 43 @type allowed_args: list 44 @raises ParameterError: if an element of args is not in allowed_args. 45 """ 46 for arg in args: 47 if arg not in allowed_args: 48 raise ParameterError("Parameter " + arg + " is not accepted by calling function.")
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jan 01 04:48:48 2009 | http://epydoc.sourceforge.net |