Timeline for Codechef: Prime Number Generator
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 15, 2017 at 10:57 | comment | added | Peilonrayz♦ |
@NeilA. try except is perfectly idiomatic in Python. break's not going to raise ValueError, as you've already mentioned, but lets say it did, just move it to the else block...
|
|
| Jun 13, 2017 at 6:25 | history | edited | Daniel | CC BY-SA 3.0 |
deleted 18 characters in body
|
| Jun 13, 2017 at 6:09 | comment | added | Neil A. |
You could consider using if x.isdigit() / else instead of a try / except ValueError. Personally I prefer avoiding try / except because something else may be masked by it, but in this case I don't think it matters.
|
|
| Jun 12, 2017 at 19:42 | history | edited | Daniel | CC BY-SA 3.0 |
Element is not a good description > argument
|
| Jun 12, 2017 at 16:23 | history | answered | Daniel | CC BY-SA 3.0 |