wtfpython icon indicating copy to clipboard operation
wtfpython copied to clipboard

Found a small problem

Open ch-yx opened this issue 4 years ago • 1 comments

I noticed the following sentence in your article .

[] = () is a semantically correct statement (unpacking an empty tuple into an empty list)

according to the python documentation, the [] on the left of the equal sign looks like a list, but it's not.


del [a,b,c] or del (a,b,c)

Similarly, the [a,b,c] that follows the del is not a list neither.

[]=() ()=[] []=()="" []=()={}

ch-yx avatar Apr 08 '21 18:04 ch-yx

according to the python documentation, the [] on the left of the equal sign looks like a list, but it's not.

Interesting, can you share the relevant parts of the documentation

satwikkansal avatar Jun 13 '21 10:06 satwikkansal