-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expected TypedDict key to be string literal
when passing {str('foo'): str('bar')}
#4029
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
Comments
But why especially this one, why not |
And ehy would you write that anyway? |
Both of those cases also seem like they could work -- there are no variables involved, so as far as I understand they'll produce the same string every time. I can totally understand the argument that there has to be a line somewhere, and that this would probably require a lot of complexity for dubious gains (i.e. why am I calculating a key for a TypedDict anyway?), so I won't be bothered if this issue gets closed. |
This is no longer necessary for us (since we've finished moving to py3), but it was to ensure that the keys/values were native string types on both py2 and py3 even with |
I understand this is going through the
str()
function, which is why it's failing, but it seems like this simple case could be handled.The text was updated successfully, but these errors were encountered: