Prev: Partly erratic wrong behaviour, Python 3, lxml
Next: 15541 - Best, Cheapest Web-Hosting, Domain at $1.99!
From: Jonathan Fine on 5 Mar 2010 10:19 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
First
|
Prev
|
Pages: 1 2 Prev: Partly erratic wrong behaviour, Python 3, lxml Next: 15541 - Best, Cheapest Web-Hosting, Domain at $1.99! |