(cls, fn, lambda_element, lambda_kw, **kw)
| 737 | |
| 738 | @classmethod |
| 739 | def get(cls, fn, lambda_element, lambda_kw, **kw): |
| 740 | try: |
| 741 | # TODO: validate kw haven't changed? |
| 742 | return cls._fns[fn.__code__] |
| 743 | except KeyError: |
| 744 | pass |
| 745 | |
| 746 | with cls._generation_mutex: |
| 747 | # check for other thread already created object |
| 748 | if fn.__code__ in cls._fns: |
| 749 | return cls._fns[fn.__code__] |
| 750 | |
| 751 | analyzed: AnalyzedCode |
| 752 | cls._fns[fn.__code__] = analyzed = AnalyzedCode( |
| 753 | fn, lambda_element, lambda_kw, **kw |
| 754 | ) |
| 755 | return analyzed |
| 756 | |
| 757 | def __init__(self, fn, lambda_element, opts): |
| 758 | if inspect.ismethod(fn): |
no test coverage detected