You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During your stream I questioned the if and(): on line 39 of lambda_function.py? I have seen if all and if any used but not that.
Are you running vanilla Python 2 or Python 3? I ask because my tests in both flag that as a syntax error.
Here is the test code I put together from what I copied from your repo:
def validate_record(event):
sn = str("Test").lower == TWITTER_SN
media = "Testmedia"
if and(
TWITTER_SN.lower() in event.get('text', '').lower()
sn,
media
):
return True
return False
print (validate_record("Testing"))
I even tried versions where I distilled it down simpler and still I get a syntax error for each in both Python 3 and 2:
During your stream I questioned the
if and():
on line 39 oflambda_function.py
? I have seenif all
andif any
used but not that.Are you running vanilla Python 2 or Python 3? I ask because my tests in both flag that as a syntax error.
Here is the test code I put together from what I copied from your repo:
I even tried versions where I distilled it down simpler and still I get a syntax error for each in both Python 3 and 2:
The text was updated successfully, but these errors were encountered: