Skip to content

Conversation

@jyapayne
Copy link

*args caused dictionary packets to get stripped of values and
as a result, keys were only left, which is useless.

Given this code example:

from socketIO_client import SocketIO, LoggingNamespace

def message(*message):
    print 'message:', message

with SocketIO('209.197.176.152', 5555, LoggingNamespace) as socketIO:
    socketIO.on('event', message)
    socketIO.wait()

The old code would have taken a packet with this dictionary:

{'something': 'important_data'}

and the output of the callback would have been

message: ('something',)

With the PR, it is correctly this output:

message: ({'something': 'important_data'},)

@invisibleroads
Copy link
Owner

Whoops, I deleted the branch for this pull request by mistake. Going to try to merge manually...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants