Skip to content
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

Fix unification of [0] if ... else [0.0] #1409

Closed
gvanrossum opened this issue Apr 19, 2016 · 0 comments
Closed

Fix unification of [0] if ... else [0.0] #1409

gvanrossum opened this issue Apr 19, 2016 · 0 comments

Comments

@gvanrossum
Copy link
Member

This is a follow-up on #1094. The fix for that issue (#1403) was originally intended to also fix the problem with [0] if ... else [0.0], which still gives an error; but I don't think it's actually that common (certainly not as common as the case where one of the branches is empty), and it's somewhat tricky to do the right thing.

FWIW repro:

[0] if False else [0.0]

The error is:

<string>:1: error: List item 0 has incompatible type "float"
@gvanrossum gvanrossum added this to the Undetermined priority milestone Apr 19, 2016
@gvanrossum gvanrossum removed this from the Undetermined priority milestone Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants