Steve Holden <[EMAIL PROTECTED]> writes: > Of course. But onc you (sensibly) decide to use an "if" then there > really isn't much difference between -1, None, () and sys.maxint as > a sentinel value, is there?
Of course there is. -1 is (under Python's perverse semantics) a valid subscript. sys.maxint is an artifact of Python's fixed-size int datatype, which is fading away under int/long unification, so it's something that soon won't exist and shouldn't be used. None and () are invalid subscripts so would be reasonable return values, unlike -1 and sys.maxint. Of those, None is preferable to () because of its semantic connotations. -- http://mail.python.org/mailman/listinfo/python-list