pubnub/python — pull request #4 by FrankSomething (2013-07-31 01:12:00+00:00)
Title: Allow call to Pubnub.publish() without a callback

Currently, the _request method assumes a callable callback parameter. However, the Pubnub API (and general pub/sub semantics) allows calls to publish() without a callback (see e.g. common/PubnubBase.py:154-158). Thus _request can be invoked with callback=None. This raises a "TypeError: 'NoneType' object is not callable" exception at line 70

The proposed change will only invoke the callback when callback != None