Timeline for answer to Checkers in Python 3 by vnp
Current License: CC BY-SA 3.0
Post Revisions
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 9, 2016 at 12:19 | comment | added | SuperBiasedMan | "puts the code on the verge of being off-topic." The original question explained what parts of the code had been done, so this isn't really in the realm of nonworking code. | |
| Feb 9, 2016 at 8:30 | comment | added | Hello_world |
I agree with you on most of the points. However, I don't really see why parsing the response directly is better than checking it before, then parsing only if the string is right. Sticking with the actual code, I would need to add new checks when parsing. eg : if len(match) != 2: return False So it may be better for speed to do it this way (I reckon regexes are pretty slow), but I think it impairs readability. Anyway, fot the current code, this implies that nobody should ever give a syntacticly incorrect string to transform_response_into_tuples which may be wrong too.
|
|
| Feb 8, 2016 at 23:28 | history | answered | vnp | CC BY-SA 3.0 |