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

Contradictory terminology about native types #47

Closed
wants to merge 1 commit into from

Conversation

Veedrac
Copy link
Contributor

@Veedrac Veedrac commented May 5, 2014

Currently future.utils.native_str is the default native string type.

One would therefore conclude that future.utils.bytes_to_native_str was the correct way to turn newbytes into a native_str, at least on Python 2. This does not work, as it is in fact a no-op on Python 2.

Personally this could be solved with a hint in the docstring (and a pointer to use native), but it could also be seen as a naming or coding bug.

Thanks for the lovely work. :)

edschofield added a commit that referenced this pull request May 5, 2014
edschofield added a commit that referenced this pull request May 5, 2014
@edschofield
Copy link
Contributor

Thanks for the feedback, @Veedrac!

A fix has just gone into v0.12.

@Veedrac
Copy link
Contributor Author

Veedrac commented May 5, 2014

Great, thanks!

The What's New document incorrectly reports it as

The ``future.utils.bytes_to_native_str`` function now returns a ``newbytes``

though, whereas it should be

The ``future.utils.bytes_to_native_str`` function now returns a ``native_str``
...
The ``future.utils.native_str_to_bytes`` function now returns a ``newbytes``

edschofield added a commit that referenced this pull request May 5, 2014
@edschofield
Copy link
Contributor

Merged into the develop branch. Thanks for the pull request! :)

@edschofield edschofield closed this May 5, 2014
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

Successfully merging this pull request may close these issues.

2 participants