Message416559
Below are four examples of impossible code that operates on nothing. The latter two continue silently, throwing no errors. I saw a bug sneak by because of this. I wonder if it is within the scope of Python's design to throw Exceptions in these situations?
x =
for x in : print("This code is never reached")
while(None): print("This code is never reached")
emptylist = []
for x in emptylist:
if emptylist[x] == "This code is never reached":
print("This code is never reached")
else: print("This code is never reached") |
|
Date |
User |
Action |
Args |
2022-04-02 15:22:18 | Luminair | set | recipients:
+ Luminair, lys.nikolaou, pablogsal |
2022-04-02 15:22:18 | Luminair | set | messageid: <1648912938.49.0.294266093677.issue47202@roundup.psfhosted.org> |
2022-04-02 15:22:18 | Luminair | link | issue47202 messages |
2022-04-02 15:22:18 | Luminair | create | |
|