openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 70 forks source link

Fix exception that occurred when tags parameter is not supplied to add_items() #69

Closed ScottKinSF closed 5 years ago

ScottKinSF commented 5 years ago

Changed default value of tags from None (not iterable) to list() (iterable).

5iver commented 5 years ago

Excellent! To keep things consistent with the rest of the code, could you switch it to [] instead of list()? Or is it better to use list()?

ScottKinSF commented 5 years ago

Sure thing. I honestly don't know which way of specifying an empty list is preferred in the python world, I'm more of a C++ guy.

5iver commented 5 years ago

[] is faster! :smile: https://stackoverflow.com/a/2972226