def generateListOperationPopCode(to_name, expression, emit, context):
    (list_arg_name,) = generateChildExpressionsCode(expression=expression, emit=emit, context=context)
    emit(('assert( PyList_Check( %s ) );' % list_arg_name))
    emit(('%s = PyObject_CallMethod(  %s, (char *)"pop", NULL );' % (to_name, list_arg_name)))
    getReleaseCode(release_name=list_arg_name, emit=emit, context=context)
    getErrorExitCode(check_name=to_name, emit=emit, context=context)
    context.addCleanupTempName(to_name)
def generateListOperationPopCode(to_name, expression, emit, context):
    (list_arg_name,) = generateChildExpressionsCode(expression=expression, emit=emit, context=context)
    emit(('assert( PyList_Check( %s ) );' % list_arg_name))
    emit(('%s = PyObject_CallMethod(  %s, (char *)"pop", NULL );' % (to_name, list_arg_name)))
    getReleaseCode(release_name=list_arg_name, emit=emit, context=context)
    getErrorExitCode(check_name=to_name, emit=emit, context=context)
    context.addCleanupTempName(to_name)