This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JohnPie
Recipients JohnPie
Date 2020-11-09.10:48:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604918894.59.0.15180711596.issue42295@roundup.psfhosted.org>
In-reply-to
Content
#The 'Walrus' operator does not support multiple assignment but does not #flag an attempt to make a multiple assigment as an error
#This results in unexpected behavior at execution time:

a, b = 100, 200

print (a, b)
#result is
#100 200

if (a, b := 3, 4): #this should be flagged as an error but is not



  print ("found true")
else:
  print ("found false")

print (a, b)
#result is
#100 3 but if multiple assigment were allowed this would be '3, 4'


----------------------------------------------------------------------
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
= RESTART: C:\Users\John PC 2017\AppData\Local\Programs\Python\Python38-32\walrustest.py
100 200
found true
100 3
>>>
History
Date User Action Args
2020-11-09 10:48:14JohnPiesetrecipients: + JohnPie
2020-11-09 10:48:14JohnPiesetmessageid: <1604918894.59.0.15180711596.issue42295@roundup.psfhosted.org>
2020-11-09 10:48:14JohnPielinkissue42295 messages
2020-11-09 10:48:14JohnPiecreate