You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Buğra Gedik (JIRA)" <ji...@apache.org> on 2017/11/10 23:42:00 UTC
[jira] [Updated] (THRIFT-4383) Repetitive Python code is generated
around serializaion/deserialization
[ https://issues.apache.org/jira/browse/THRIFT-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Buğra Gedik updated THRIFT-4383:
--------------------------------
Description:
When I look at the generated Python code, I see code like the following repeated all over the place:
{code}
iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
{code}
Given that system info is not going to change, can't this be abstracted via a helper function?
was:
When I look at the generated Python code, I see code like the following repeated all over the place:
```
iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
```
Given that system info is not going to change, can't this be abstracted via a helper function?
> Repetitive Python code is generated around serializaion/deserialization
> -----------------------------------------------------------------------
>
> Key: THRIFT-4383
> URL: https://issues.apache.org/jira/browse/THRIFT-4383
> Project: Thrift
> Issue Type: Bug
> Components: Python - Library
> Affects Versions: 0.10.0
> Reporter: Buğra Gedik
> Priority: Minor
>
> When I look at the generated Python code, I see code like the following repeated all over the place:
> {code}
> iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
> {code}
> Given that system info is not going to change, can't this be abstracted via a helper function?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)