Possibility for a char
type
#1579
tusharsadhwani
started this conversation in
General
Replies: 1 comment 3 replies
-
This is being discussed in #256. I think the overall consensus is that being able to distinguish between |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering if the type system should add a
char
type: a subclass ofstr
, and operations like__getitem__
on astr
would return achar
.The major problem that this would solve is that currently you can pass a
str
where anIterable[str]
is expected, which has caused many bugs in my experience.What are the potential downsides of such a subtype?
Beta Was this translation helpful? Give feedback.
All reactions