-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
Milestone
Description
The interface description of 'jsonLoads' defines the optional parameter 'referenceDir':
def jsonLoads(self, sJsonpContent : str, referenceDir : str = ''):
* ``referenceDir``
/ *Condition*: optional / *Type*: str /
But the default value that is required for optional parameters, is missing in docstring.
Is there a certain reason to use an empty string as default value? Usually None is used to indicate that an optional parameter is not used and should not have any effect.
Intuitively, within a test I used the usual None. But calling the method with referenceDir=None causes:
stat: path should be string, bytes, os.PathLike or integer, not NoneType
I would prefer:
def jsonLoads(self, sJsonpContent : str, referenceDir : str = None):
* ``referenceDir``
/ *Condition*: optional / *Type*: str / *Default*: None /
Metadata
Metadata
Assignees
Labels
Projects
Status
Done