-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.good first issueGood for newcomersGood for newcomersstandard libraryArea: Standard library umbrellaArea: Standard library umbrella
Description
Previous ID | SR-187 |
Radar | None |
Original Reporter | PatrickPijnappel (JIRA User) |
Type | Bug |
Status | Closed |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Standard Library |
Labels | Bug, StarterBug |
Assignee | PatrickPijnappel (JIRA) |
Priority | Medium |
md5: 83c44df492df40d194828ff6d075d8fc
Issue Description:
The docs for Int(_, radix:)
lists the regex as being
[-+]?[0-9a-zA-Z]
but the exact regex for the code as is seems to be
(-+?|+?)[0-9a-zA-Z]*|-*0)
That is, it accepts these cases beyond what the docs specify:
-
Any number of minuses followed by a 0
-
A minus followed by a plus followed by any number
It seems unlikely this is by design, and contradicts the documentation by not returning nil in those cases.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.good first issueGood for newcomersGood for newcomersstandard libraryArea: Standard library umbrellaArea: Standard library umbrella