On Mon, 19 Apr 2021 13:37:56 -0700 Ethan Furman <et...@stoneleaf.us> wrote: > On 4/19/21 10:51 AM, Larry Hastings wrote: > > > Something analogous /could/ happen in the PEP 649 branch but currently > > doesn't. When running Inada Noki's benchmark, > > there are a total of nine possible annotations code objects. Except, each > > function generated by the benchmark has a > > unique name, and I incorporate that name into the name given to the code > > object (f"{function_name}.__co_annotations__"). > > Since each function name is different, each code object name is different, > > so each code object /hash/ is different, and > > since they aren't /exact/ duplicates they are never consolidated. > > I hate anonymous functions, so the name is very important to me.
You are unlikely to notice the name of the code object underlying __co_annotations__, aren't you? > Or maybe the name can be store when running in debug mode, and not stored > with -O ? Almost nobody uses -O. Optimizations that are enabled only in -O are useless. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/BVPWTWVKFEL4XNSWSELWY5DW62DNWY64/ Code of Conduct: http://python.org/psf/codeofconduct/