Issue 36967: Eliminate unnecessary check in _strptime when determining AM/PM
Created on 2019-05-19 21:24 by gphemsley, last changed 2022-04-11 14:59 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13428 | open | gphemsley, 2019-05-19 21:28 | |
| Messages (1) | |||
|---|---|---|---|
| msg342872 - (view) | Author: Gordon P. Hemsley (gphemsley) * | Date: 2019-05-19 21:24 | |
Since __calc_am_pm() explicitly limits self.am_pm to 2 values, there are only ever 3 possible values of %p: AM, PM, or blank. Since blank is treated the same as AM, there is only the need to check whether %p is PM. This eliminates an unnecessary comparison and doubly ensures that there is no unhandled case. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:15 | admin | set | github: 81148 |
| 2019-05-19 21:29:50 | gphemsley | set | components: + Library (Lib) |
| 2019-05-19 21:28:01 | gphemsley | set | keywords:
+ patch stage: patch review pull_requests: + pull_request13338 |
| 2019-05-19 21:24:06 | gphemsley | create | |