Madhan Neethiraj created RANGER-3129:
----------------------------------------
Summary: Python client uses incorrect default value assignment for
method parameters
Key: RANGER-3129
URL: https://issues.apache.org/jira/browse/RANGER-3129
Project: Ranger
Issue Type: Bug
Components: Ranger
Affects Versions: 2.2.0
Reporter: Madhan Neethiraj
Assignee: Madhan Neethiraj
Python client implementation for Ranger assigns an empty list as default value
to method parameters. This can result in errors if the parameter value is
updated by the method, due to Python handling of default values - more details
at [https://docs.python.org/3/tutorial/controlflow.html#defining-functions]
(search for *warning*)*:*
*Important warning:* The default value is evaluated only once. This makes a
difference when the default is a mutable object such as a list, dictionary, or
instances of most classes.
Though the parameter value is not updated in Ranger Python client
implementation, fixing this will help avoid potential issues later.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)