Staging
v0.8.1
https://github.com/python/cpython
Revision b6724be8047ac2404aab870d35d8f95bb0b7036a authored by Miss Islington (bot) on 04 August 2020, 00:56:54 UTC, committed by GitHub on 04 August 2020, 00:56:54 UTC

incr cannot be larger than INT_MAX: downcast to int explicitly.
(cherry picked from commit bde48fd8110cc5f128d5db44810d17811e328a24)

Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 3c4fc86
Raw File
Tip revision: b6724be8047ac2404aab870d35d8f95bb0b7036a authored by Miss Islington (bot) on 04 August 2020, 00:56:54 UTC
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
Tip revision: b6724be
rmpyc.py
# Remove all the .pyc files under ../Lib.


def deltree(root):
    import os
    from os.path import join

    npyc = 0
    for root, dirs, files in os.walk(root):
        for name in files:
            # to be thorough
            if name.endswith(('.pyc', '.pyo')):
                npyc += 1
                os.remove(join(root, name))

    return npyc

npyc = deltree("../Lib")
print(npyc, ".pyc deleted")
back to top