LWN.net Logo

Jones: system call abuse

Jones: system call abuse

Posted Nov 10, 2010 6:18 UTC (Wed) by wahern (subscriber, #37304)
In reply to: Jones: system call abuse by MisterIO
Parent article: Jones: system call abuse

Ha. Good catch. If it was meant between 0 and 3 inclusive then yes. And that's fair assumption in this case, because if it was meant exclusive then rand() % 3 still wouldn't be right; you'd need (rand() % 2) + 1.


(Log in to post comments)

You can take the programmer out of the python.

Posted Nov 10, 2010 13:42 UTC (Wed) by gmatht (guest, #58961) [Link]

But you can't take the python out of the programmer.

$ python
>>> range(0,3)
[0, 1, 2]

Perhaps he was testing the secret rewrite of Linux in Python? ;)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds