A function must return False for an empty list. Your test instead gets IndexError. Which comment identifies the required behavior problem?
- Empty input raises IndexError instead of returning False.
- I prefer a different private variable name in this function.
- I prefer an extra blank line before this function's return.
Which set of checks best describes a code review?
- The author's experience and the edit date.
- The file's length, the author's naming taste and the number of comments.
- Required behavior, effects on other code and ease of understanding.
Renaming a function used by other code is always a personal preference and cannot break behavior.
Circle one: True False
A search function now returns 0 for no results, as its new requirement says. A caller still tries to count the returned list. What should the reviewer inspect?
- Callers that still expect the function to return a list.
- Only tests of the function's new 0 result, ignoring callers.
- Only the changed function's formatting, ignoring returned values.
You are unsure whether a changed function handles empty input as required. Which comment checks that uncertainty?
- Use my preferred empty-input result.
- What happens when this function receives empty input?
- The empty-input handling is defective, although I have not checked it.
The requirement says to reject negative quantities. You reproduce a total of -6 for quantity -2. Which comment gives evidence for the required repair?
- Permit quantity -2 and its total of -6.
- Quantity -2 gives -6, but the requirement says to reject negative quantities.
- Quantity -2 gives -6, so rename the total variable without changing its behavior.
The request says a missing discount must give 0 and prices must stay exact. A diff also changes a price of 8.75 to 9. Its missing-discount test passes. Which pair of review checks is needed?
- Check the missing-discount result and price precision.
- Check names and blank lines.
- Check indentation choices and the author's preferred naming style.
You verify a crash for an input the function must accept. You also dislike a clear private variable name that follows team rules. What should lead the review?
- Require your preferred name before reporting the verified crash.
- Treat the crash and your optional naming preference as equally blocking.
- Report the crash first and identify the rename as optional.