Re: passing dictionay as argument

2016-06-13 Thread marco . nawijn
On Monday, June 13, 2016 at 12:54:45 PM UTC+2, Arshpreet Singh wrote: > I have to pass dictionary as function argument for following code: > > > import authorize > > authorize.Configuration.configure( > authorize.Environment.TEST, > 'api_login_id', > 'api_transaction_key', > ) > > r

Re: passing dictionay as argument

2016-06-13 Thread Frank Millman
"Arshpreet Singh" wrote in message news:0b6372ce-3f16-431b-9e72-42d5c935d...@googlegroups.com... I have to pass dictionary as function argument for following code: [...] result = authorize.Transaction.sale({ 'amount': 40.00, 'credit_card': { 'card_number': '411

Re: passing dictionay as argument

2016-06-13 Thread David Navarro
To be equivalent to the other one it should be: result = authorize.Transaction.sale({'amount': 40.00, 'credit_card': credit_card}) In this line: result = authorize.Transaction.sale({40.00,credit_card}) You are not putting keys in the dictionary. If there are no keys Python creates a 'set literal