Jonathan Fine wrote:
Hi

We can call a function fn using
    val = fn(*args, **kwargs)

I'm looking for a good name for the pair (args, kwargs).  Any suggestions?

Here's my use case:
    def doit(fn , wibble, expect):
        args, kwargs = wibble
        actual = fn(*args, **kwargs)
        if actual != expect:
            # Something has gone wrong.
            pass

This is part of a test runner.

For now I'll use argpair, but if anyone has a better idea, I'll use it.

Thank you, Tim, Paul, Steve and Aahz for your suggestions.

I'm now preferring:

    def test_apply(object, argv, valv):
        
        args, kwargs = argv
        expect, exceptions = valv

        # Inside try: except:
        actual = object(*args, **kwargs)

        # Check against expect, exceptions.

best regards


Jonathan



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to