Did I find the right examples for you? yes no

All Samples(16)  |  Call(0)  |  Derive(0)  |  Import(16)
Function decorator that makes the function accept only keyword params.

All this does right now is make sure the error message is clearer when
you try to pass a non-keyword param.

        def keywords_only(f):
    """Function decorator that makes the function accept only keyword params.

       All this does right now is make sure the error message is clearer when
       you try to pass a non-keyword param."""
    def f_new(*f_args, **f_kwargs):
        if len(f_args) > 1:
            raise ValueError("This method accepts only keyword arguments. See `help({0})`".format((f.__name__)))
        return f(*f_args, **f_kwargs)
    return f_new
        


src/c/h/chube-0.1.18/chube/stackscript.py   chube(Download)
"""Module for the Stackscript model."""
import json
 
from .api import api_handler
from .util import RequiresParams, keywords_only

src/c/h/chube-0.1.18/chube/nodebalancer.py   chube(Download)
"""Module for Nodebalancer-related models."""
from .api import api_handler
from .util import RequiresParams, keywords_only
from .model import *
 

src/c/h/chube-0.1.18/chube/linode_obj.py   chube(Download)
 
from .api import api_handler
from .util import RequiresParams, keywords_only
from .model import *
from .datacenter import Datacenter

src/c/h/chube-0.1.18/chube/dns.py   chube(Download)
"""Module for DNS-related models."""
from .api import api_handler
from .util import RequiresParams, keywords_only
from .model import *
 

src/c/h/chube-HEAD/chube/stackscript.py   chube(Download)
"""Module for the Stackscript model."""
import json
 
from .api import api_handler
from .util import RequiresParams, keywords_only

src/c/h/chube-HEAD/chube/nodebalancer.py   chube(Download)
"""Module for Nodebalancer-related models."""
from .api import api_handler
from .util import RequiresParams, keywords_only
from .model import *
 

src/c/h/chube-HEAD/chube/linode_obj.py   chube(Download)
 
from .api import api_handler
from .util import RequiresParams, keywords_only
from .model import *
from .datacenter import Datacenter

src/c/h/chube-HEAD/chube/dns.py   chube(Download)
"""Module for DNS-related models."""
from .api import api_handler
from .util import RequiresParams, keywords_only
from .model import *
 

src/c/h/chube-0.1.18/chube/plan.py   chube(Download)
from decimal import Decimal
 
from .api import api_handler
from .model import *
from .util import keywords_only

src/c/h/chube-0.1.18/chube/kernel.py   chube(Download)
from .api import api_handler
from .model import *
from .util import keywords_only
 
class Kernel(Model):

  1 | 2  Next