A python module for retrieving and parsing WHOIS data
After seeing some strange behavior while trying to write unittests for my script which uses [python-whois](https://github.com/joepie91/python-whois), I thought I would go ahead and submit this patch. This PR addresses a comment made here: https://github.com/joepie91/python-whois/commit/d86e4ba9166e80b8c66b093b355f3c32e94c0229#commitcomment-6967148 This stackoverflow question covers the topic pretty well: [“Least Astonishment” in Python: The Mutable Default Argument](http://stackoverflow.com/q/1132941/1547030) From docs.python.org: > Default parameter values are evaluated when the function definition is > executed. This means that the expression is evaluated once, when the > function is defined, and that the same “pre-computed” value is used for > each call. This is especially important to understand when a default > parameter is a mutable object, such as a list or a dictionary: if the > function modifies the object (e.g. by appending an item to a list), the > default value is in effect modified. This is generally not what was > intended. A way around this is to use None as the default, and > explicitly test for it in the body of the function > > https://docs.python.org/2/reference/compound_stmts.html#function-definitions
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by stavxyz and has received 5 comments.