Skip to content

Contradictory terminology about native types#47

Closed
Veedrac wants to merge 1 commit intoPythonCharmers:masterfrom
Veedrac:master
Closed

Contradictory terminology about native types#47
Veedrac wants to merge 1 commit intoPythonCharmers:masterfrom
Veedrac:master

Conversation

@Veedrac
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Thanks for the feedback, @Veedrac!

A fix has just gone into v0.12.

@Veedrac
Copy link
Copy Markdown
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
Copy Markdown
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