THRIFT-1480. py: remove tabs, adjust whitespace and address PEP8 warnings

This patch addresses a host of PEP8 lint problems.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1226890 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/py/src/TSerialization.py b/lib/py/src/TSerialization.py
index b19f98a..8a58d89 100644
--- a/lib/py/src/TSerialization.py
+++ b/lib/py/src/TSerialization.py
@@ -20,15 +20,19 @@
 from protocol import TBinaryProtocol
 from transport import TTransport
 
-def serialize(thrift_object, protocol_factory = TBinaryProtocol.TBinaryProtocolFactory()):
+
+def serialize(thrift_object,
+              protocol_factory=TBinaryProtocol.TBinaryProtocolFactory()):
     transport = TTransport.TMemoryBuffer()
     protocol = protocol_factory.getProtocol(transport)
     thrift_object.write(protocol)
     return transport.getvalue()
 
-def deserialize(base, buf, protocol_factory = TBinaryProtocol.TBinaryProtocolFactory()):
+
+def deserialize(base,
+                buf,
+                protocol_factory=TBinaryProtocol.TBinaryProtocolFactory()):
     transport = TTransport.TMemoryBuffer(buf)
     protocol = protocol_factory.getProtocol(transport)
     base.read(protocol)
     return base
-