#28907 closed Cleanup/optimization (fixed)
Exploit that iterating over empty sequences is noop
| Reported by: | Дилян Палаузов | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Other) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
.. and don't check if a sequence is empty, before looping over it
Attachments (1)
Change History (5)
by , 8 years ago
| Attachment: | less_ifs.patch added |
|---|
comment:1 by , 8 years ago
comment:2 by , 8 years ago
| Component: | Uncategorized → Core (Other) |
|---|---|
| Triage Stage: | Unreviewed → Ready for checkin |
PR. I removed the test changes from the patch as those don't work as Jaap mentioned.
comment:4 by , 8 years ago
Indeed, I have not thought on the cases, where the if value: can be None.
Note:
See TracTickets
for help on using tickets.
This would be easier to review if it was a pull request.
In the patch I see at least one case where the
ifcondition should not be eliminated because it also needs to catchNonevalues.