Oct-01-2017, 12:21 PM
why do you need to check the type?
https://en.wikipedia.org/wiki/Duck_typing
in this particular case if user supply a 3-element list, it would serve the same as 3-element tuple (if not t for the test)...
by the way, tuple is not mutable, so you can safely supply default RGB tuple in the function signature
https://en.wikipedia.org/wiki/Duck_typing
in this particular case if user supply a 3-element list, it would serve the same as 3-element tuple (if not t for the test)...
by the way, tuple is not mutable, so you can safely supply default RGB tuple in the function signature
def add_option(mnu_caption, txt_colour=(255, 255, 255)):