Skip to content

a sprinkle of unicode #150

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

Merged
merged 3 commits into from
Apr 18, 2016
Merged

a sprinkle of unicode #150

merged 3 commits into from
Apr 18, 2016

Conversation

mr-c
Copy link
Contributor

@mr-c mr-c commented Apr 17, 2016

No description provided.

def warning(self, msg: Union[str, unicode], *args, **kwargs) -> None: ...
def warn(self, msg: Union[str, unicode], *args, **kwargs) -> None: ...
def error(self, msg: Union[str, unicode], *args, **kwargs) -> None: ...
def exception(self, msg: Unions[str, unicode], *args, **kwargs) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo (Unions).

@gvanrossum
Copy link
Member

Actually this would probably work just as well with just unicode instead of Union[str, unicode], since mypy considers str a subclass of unicode.

@mr-c
Copy link
Contributor Author

mr-c commented Apr 18, 2016

@gvanrossum Fixed, now just unicode & I added a couple more.

@matthiaskramm
Copy link
Contributor

I'd prefer if we did not make the assumption that all type-checkers consider str a subclass of unicode.

I know mypy is one of the primary users of typeshed, but implementation details of mypy still shouldn't leak into typeshed.

@gvanrossum
Copy link
Member

Really sorry, I had forgotten about that. Let's go back to the Unions, at least until we have agreement on what to do for strings (python/mypy#1141 -- though we should really have the discussion in https://github.com/python/typing/issues).

@matthiaskramm
Copy link
Contributor

Added python/typing#204, in an attempt to merge the two discussion threads.

Yes, let's use Unions for the time being. Maybe it would make sense to have a "Text" type in typeshed only.

@mr-c
Copy link
Contributor Author

mr-c commented Apr 18, 2016

Thank you all; this is ready for merging.

@gvanrossum gvanrossum merged commit 2f59de4 into python:master Apr 18, 2016
@gvanrossum
Copy link
Member

Thanks!

momandine pushed a commit to momandine/typeshed that referenced this pull request Jul 5, 2016
Don't iterate over ellipsis in Callable when evaluating types. Fix python#149
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.

3 participants