- The code won't run from the command line under linux, nor does it run from the Python command line. Feature request?
- I made a change to how the sqrt function works (it was even more 'hacky'). Actually the whole check for negative numbers the using the complex math library seems a bit clunky. Options? Major sin: I didn't check to see if it works. I'll post it anyway.*
- On that note, I have a feeling that the sqrt function only returns the first value. Fails functional spec. D'oh.A comment on the spec: three of the functions expect a single return value, however the fourth (sqrt), expects a list to be returned. Something that should have considered in the 'architecture'.
- Should the doit() have been called main(), and the output in that routine, instead of printing the result of doit()?
- The shebang line to make it run on Linux was expected. It was a bit of easter egg to try and get people to check further...
- I hadn't got up to the chapter on list comprehensions, or I've skipped it.
- sys.exit instead of exit. That appears to be a bit of a trap.
- It should have unit testing in the module specified.
- Docstrings are absent.
Syntax Highlighting
Tuesday, 1 January 2013
ProgEx: Python Ex1 rev 1 comments
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment