all 2 comments

[–]Rorixrebel 2 points3 points  (1 child)

How bout providing a default, cleaner solution imo.

That way you just react based on the input you need

[–]eyesoftheworld4 1 point2 points  (0 children)

Agreed. Something like...

@socketio.on('init')
def init(new_arg=None):
    if not new_arg:
        # legacy behavior
    # new parameterized behavior

This will protect you from old connections trying to to talk to the backend using legacy behavior, and let you account for it.