parameters: (f, self, *args, **kwargs)
return_statement: return f(self, *args, **kwargs)
docstring: Wrap a cursor method that cannot be called when the cursor is closed.
docstring_summary: Wrap a cursor method that cannot be called when the cursor is closed.
docstring_tokens: Wrap a cursor method that cannot be called when the cursor is closed .
function: def check(f, self, *args, **kwargs):
      """ Wrap a cursor method that cannot be called when the cursor is closed. """
      if self._closed:
          raise psycopg2.OperationalError('Unable to use a closed cursor.')
      return f(self, *args, **kwargs)
function_tokens: def check ( f , self , * args , * * kwargs ) : if self . _closed : raise psycopg2 . OperationalError ( 'Unable to use a closed cursor.' ) return f ( self , * args , * * kwargs )