You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]`&=` operator needs special treatment when `__iand__` doesn't exist[/-][+]`&=` broken when `__iand__` does not exist[/+]on Jun 9, 2016
Maybe the methods will have to be overloaded or use a type variable, since when calling with an int argument the result is int, whereas when called with bool the result is bool (similar to int/float).
Activity
[-]`&=` operator needs special treatment when `__iand__` doesn't exist[/-][+]`&=` broken when `__iand__` does not exist[/+]gvanrossum commentedon Jun 9, 2016
Why is '&=' special? What's different with all other binary operators?
jhance commentedon Jun 9, 2016
I just edited it after reading the code in not-11:30 mode, I agree completely now and am not sure why its broken for
&=[-]`&=` broken when `__iand__` does not exist[/-][+]`&=` broken for bools[/+]gvanrossum commentedon Jun 9, 2016
Seems the problem really is that
&,|and^on bool arguments should be defined to return bools. This can be fixed in the stubs.JukkaL commentedon Jun 9, 2016
Maybe the methods will have to be overloaded or use a type variable, since when calling with an int argument the result is int, whereas when called with bool the result is bool (similar to int/float).
[-]`&=` broken for bools[/-][+]`&`, `|`, and `^` bool stubs incorrect[/+]gvanrossum commentedon Nov 1, 2016
Closing in favor of python/typeshed#649