Files
toxygen/toxygen/common/provider.py
emdee@spm.plastiras.org 2717f4f6e5
Some checks are pending
CI / Python ${{ matrix.python-version }} (3.10) (push) Waiting to run
CI / Python ${{ matrix.python-version }} (3.7) (push) Waiting to run
CI / Python ${{ matrix.python-version }} (3.8) (push) Waiting to run
CI / Python ${{ matrix.python-version }} (3.9) (push) Waiting to run
updates
2024-02-13 21:00:45 +00:00

14 lines
347 B
Python

# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
class Provider:
def __init__(self, get_item_action):
self._get_item_action = get_item_action
self._item = None
def get_item(self):
if self._item is None:
self._item = self._get_item_action()
return self._item