Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For those who might find it helpful. Applicable to python3 only #4

Open
thomasdola opened this issue May 31, 2017 · 0 comments
Open

Comments

@thomasdola
Copy link

screenshot from 2017-05-31 00-20-23

  • If we look closely to these tables -> columns for erlang binary() to python bytes() for [python3 only] vise versa.

  • This basically means that arguments of str() data type in erlang sent over to python functions will be converted to bytes() in python3.

  • So for python functions expecting arguments of str() data type, do not forget to convert the received arguments back to python string before using.

# gist ref
decoded_args = locals()
for arg_name, arg_value in locals().items():
if isinstance(arg_value, bytes):
decoded_args[arg_name] = arg_value.decode("utf-8")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant