Dan Schmidt <dfan at harmonixmusic.com> écrit: > Well, you can always do something like this: > def bitl(x): > assert x >= 0 > n = 0 > while x > 256: > n = n + 8 > x = x >> 8 > while x > 0: > n = n + 1 > x = x >> 1 > return n I'm saving these ideas. Thanks to all. -- François Pinard http://www.iro.umontreal.ca/~pinard