Jan-03-2018, 08:47 PM
Gribouillis's solution is "smelly": not necessarily wrong but indicates the existence of a problem. In this case, the decorator creates a more-global namespace which is something that should be avoided. In a large program, you may have two thetime methods that you want to register... well, only one is getting used.
Namespaces are great and we need to do more of them, quoth the Zen of Python.
Namespaces are great and we need to do more of them, quoth the Zen of Python.