Staging
v0.8.1
https://github.com/python/cpython
Revision 7309cca1471d556c139896dd8057d1feba378113 authored by Miss Islington (bot) on 17 August 2019, 20:51:57 UTC, committed by GitHub on 17 August 2019, 20:51:57 UTC


Because mod, func, class, etc all share one namespace, :func:time creates a link to the time module doc page rather than the time.time function.
(cherry picked from commit 1b1d0514adbcdd859817c63d1410455c64660d78)


Co-authored-by: Éric Araujo <merwok@netwok.org>

Automerge-Triggered-By: @merwok
1 parent f991912
Raw File
Tip revision: 7309cca1471d556c139896dd8057d1feba378113 authored by Miss Islington (bot) on 17 August 2019, 20:51:57 UTC
[3.8] fix link to time function from time_ns doc (GH-15285) (GH-15321)
Tip revision: 7309cca
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