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
base: master
from

Conversation

Projects
None yet
2 participants
@Veedrac
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@edschofield

edschofield May 5, 2014

Contributor

Thanks for the feedback, @Veedrac!

A fix has just gone into v0.12.

Contributor

edschofield commented May 5, 2014

Thanks for the feedback, @Veedrac!

A fix has just gone into v0.12.

@Veedrac

This comment has been minimized.

Show comment
Hide comment
@Veedrac

Veedrac May 5, 2014

Contributor

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``
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@edschofield

edschofield May 5, 2014

Contributor

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

Contributor

edschofield commented May 5, 2014

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