0

Hi there
I am translating PERL code into PYTHON Code
My PERL code is

if ( my $client = $dealing_clients->{ $data->{fundId} } )

And i translated it into python as

if (client = dealing_clients[data["fundId"]]):

But it is giving my following Error
"Syntax Error While detecting Tuple"

Any one know how to fix this error and why i am getting this error?
Waiting for guidance. Thanks in advance.

Regards
Sarfraz

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by sarfrazashfaq
0

try

if client == dealing_clients[data["fundId"]]:

() <- it's a tuple, or an immutable list.
= <- assign operator, you should never use that in a if statement. I'm going to guess you meant an compare operator, which is ==

0

try

if client == dealing_clients[data["fundId"]]:

() <- it's a tuple, or an immutable list.
= <- assign operator, you should never use that in a if statement. I'm going to guess you meant an compare operator, which is ==

HI
Its worked. Thanks buster....

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.