I'm creating a very basic match-market solution that would be used in betting shops. I have a function that looks like this:
def create_market(name, match, providerID=str(uuid.uuid4()), market_kind=4, *market_parameters):
I want to call a function with only name
, match
and market_parameters
while skipping the providerID
, and market_kind
(since these are optional)
Keep in mind that *market_parameters
will be a tuple of dicts that will be sent inside the function. I unpack it like:
for idx, data in enumerate(args):
for k, v in data.iteritems():
if 'nWays' in k:
set_value = v
When I set this dict like
market_parameters = {'nWays' : 5}
and call a function like create_market('Standard', 1, *market_parameters)
I can't seem to get the data inside the function body.
What am I doing wrong?