2 ms·
There's a lot of not-actually-true statements in there, sibling posts got a couple but also: * tripped you with integer division <-- I always thought (and sti
by GFK_of_xmaspast 11y ago
There's a lot of not-actually-true statements in there, sibling posts got a couple but also:
* tripped you with integer division <-- I always thought (and still think) that integer division should return integers, not promote to float
* had a range object which is not memory efficient <-- just use xrange
- dalke 11y agoMany people agree with you about division. Many more disagree. There were long discussions about the merits. One of the reasons for having 1/2 == 0.5 is that user testing of relatively new programmers showed that many a mistake. My own experience working with computational chemists (who are relatively new programmers) confirms that. I myself has an experienced program also make that mistake, so nowadays always use the future directive to get float division.