Hi, On Mon, 20 Sept 2021 at 22:33, M A <teammember0...@gmail.com> wrote: > Hi I was working in the file lib-python/2.7/distutils/sysconfig_pypy.py, on > the function _init_posix(). I placed print() statements in the function to > indicate when this function is called. After fully building pypy the print() > statements were never called. I then used grep to try to find out where this > function is called in the source code. I ran this command: grep > "_init_posix()" -r *. After looking at the results it looks like this > function is never called by anything. Why do we have it? More importantly can > we delete it?
It is called from the same file by these line: func = globals().get("_init_" + os.name) if func: func() If you don't see print statements at runtime, then it might be the case that it's called at translation time instead. The module's state with _init_posix() already called would then get frozen inside the translated pypy. A bientôt, Armin _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev