Paul Rubin escreveu: > Paulo da Silva <[EMAIL PROTECTED]> writes: >> May be this is what you want ... >> I didn't test it enough ... but seems fine. > > That's way too complicated. Think about Gerald Flanagan's description > of the telegraph poles, and how to implement simply. It is a two liner.
I hadn't seen that yet. A *nice idea*. Just two lines!!! I had a similar problem but with floats (%). I solved it using the previous way in C. For float it is very simple. So I adapted it for python and ints. That resulted in a lot more complex code. -- http://mail.python.org/mailman/listinfo/python-list