3 ms·
len() may be either expensive or not possible to calculate for some collections where an emptiness check is trivial. For example a proxy for results from some p
by viraptor 3y ago
len() may be either expensive or not possible to calculate for some collections where an emptiness check is trivial. For example a proxy for results from some paged API where you hold the first page initially. Empty check is immediate, len() may take hours.