[
https://issues.apache.org/jira/browse/THRIFT-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695550#action_12695550
]
Alexander Shigin commented on THRIFT-335:
-----------------------------------------
David, I copy-paste zig-zag from c++ patch. I've just checked the protobuf
documentation. The current version of makeZigZag makes the right result for
examples in the doc.
What wrong with the current code? Of course, I do prefer the next variant. It's
much simpler to understand if you ain't god in bit operation.
{code}
def makeZigZag(n):
if n > 0:
return 2*n
else:
return -2*n + 1
{code}
But it can be confusing to get two different implementation of the same
algorithm in different languages.
> Compact Protocol for Python
> ---------------------------
>
> Key: THRIFT-335
> URL: https://issues.apache.org/jira/browse/THRIFT-335
> Project: Thrift
> Issue Type: Sub-task
> Components: Library (Python)
> Reporter: Bryan Duxbury
> Priority: Trivial
> Attachments: thrift-compact-python-v1.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.