pubnub/python — pull request #1 by gilles (2013-06-10 17:24:41+00:00)
Title: pep8 + custom serializer

Hi,

This pull request contains 2 things:

* PEP8 formatting.
* Added the possibility to use a custom serializer for the message. The default one is the same as what is currently in master.

Unfortunately I can't run the unit test. Pubnub retrurns a 400 without other explanation, even when I try on master (and with my keys)

I also have a couple of remarks:

- Input validation. Some method returns an array [0, 'Missing Channel or Message'], some others raises an Exception. We could have all the input raise a ValueError.
- The input is a dict, this could be changed into positional arguments:
- def publish(self, args) => def publish(self, channel, message)

Both of these changes break the API so it should go in a 4.X version

Let me know of you're interested.

Thanks

--Gilles