pythoncode-tutorials
pythoncode-tutorials copied to clipboard
Code is unreachable Pylance on Server.py
https://github.com/x4nth055/pythoncode-tutorials/blob/master/python-standard-library/chat-application/server.py
When I put all the code in server.py into VSCode, it suddenly shows an error Code is unreachable Pylance
and it seems because while True:
before :
# close client sockets
for cs in client_sockets:
cs.close()
# close server socket
s.close()
Can you update the code again, I need it :)
Hello @LyQuid12 ,
It's been a while since I wrote that code and I have that warning as well on VSCode, you can simply delete that block of code or leave it as is, it's just a warning and you still can run the code normally.
Hope this helps.