Skip to content

Mapping over an empty list should return an empty list #129

Description

@Vaishaal

This is super dumb but mapping over an empty list shouldn't throw an exception. It should just return an empty list.

pwex.map(lambda x: x, [])


UnboundLocalError Traceback (most recent call last)
in ()
----> 1 pwex.map(lambda x: x, [])

/home/ubuntu/pywren/pywren/executor.py in map(self, func, iterdata, extra_env, extra_meta, invoke_pool_threads, data_all_as_one, use_cached_runtime, overwrite_invoke_args, exclude_modules)
281 pool.close()
282 pool.join()
--> 283 logger.info("map invoked {} {} pool join".format(callset_id, call_id))
284
285 # FIXME take advantage of the callset to return a lot of these

UnboundLocalError: local variable 'call_id' referenced before assignment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions