Can we store socket objects in a Python dictionary. I want to create a socket, save the socket object, do some things, and then read from the socket (search from a dictionary to get socketobject).
Yes:
>>> import socket >>> s = socket.socket() >>> d = {"key" : s} >>> d {'key': <socket._socketobject object at 0x00CEB5A8>}
Source: https://habr.com/ru/post/1716884/More articles:Oracle Data Type List - typesjavascript web charts - javascriptselect a file by clicking on the image? (not with browse button) - inputfunction to get an array of arbitrary type in C # - objectSeparation of intervals in weeks in Postgres - datehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1716885/how-to-write-strings-as-binaries-to-file&usg=ALkJrhhii7AA55FSyKGzqyQZ6yftOz6gTwDo all class methods return an auto-implemented object? - memory-managementLoaded PDF from Java is corrupted? - javaiPhone: Is it worth developing an application to support OS 2.2? - iphoneHow to get SessionID by request, where EnableSessionState = "False" - asp.netAll Articles