def do_int(value, default=0):
    try:
        return int(value)
    except (TypeError, ValueError):
        # this quirk is necessary so that "42.23"|int gives 42.
        try:
            return int(float(value))
        except (TypeError, ValueError):
            return default
The Twisted tarball contains everything in the source checkout, with
dataset/ETHPy150Open IanLewis/kay/kay/lib/jinja2/filters.py/do_int--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/test/test_release.py/DistributionBuilderTest.test_twistedDistribution