8000 [WIP] Add a sane set of method definitions to basestring. by gvanrossum · Pull Request #138 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

[WIP] Add a sane set of method definitions to basestring. #138

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

Closed
wants to merge 2 commits into from

Conversation

gvanrossum
Copy link
Member

DON'T MERGE YET! We need to think this through carefully. This is just a first stab. I will add some comments to particularly worrisome parts.

@JukkaL
Copy link
Contributor
JukkaL commented May 16, 2016

I'm not sure if this will be useful, due to issues mentioned in python/mypy#1537, at least as such.

Having basestring aliased to Union[bytes, unicode] might work better (I think somebody suggested it), though the resulting error messages could be confusing, as they wouldn't refer to basestring.

I suspect that we'll have to attack the entire str/bytes/unicode/etc. type checking problem all at once instead of approaching it incrementally :-(

@gvanrossum
Copy link
Member Author
gvanrossum commented May 16, 2016 via email

@gvanrossum gvanrossum changed the title Add a sane set of method definitions to basestring. [WIP] Add a sane set of method definitions to basestring. Jul 18, 2016
@gvanrossum
Copy link
Member Author

Abandoning this. Maybe we should redefine basestring as Union[str, unicode]?

@gvanrossum gvanrossum closed this Aug 5, 2016
@gvanrossum gvanrossum deleted the basestring branch August 5, 2016 19:07
hswong3i pushed a commit to alvistack/python-typeshed that referenced this pull request May 25, 2025
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
0