Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced *args with args. #104

Open
wants to merge 7 commits into
base: 0.5.6
Choose a base branch
from
Open

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