Re:The Day Python Embarassed Imperative Programming
by hythloday on Monday February 27, 2012 @07:51PM
(#3641322)
Sure, it's just a specific kind of type-checking decorator in the same vein as the ones you can see at e.g. [0]. Obviously it can be made a lot more sophisticated to only pick up certain arguments. You can do a similar thing with metaclasses to prevent object attributes being set as None, too.
[0]http://code.activestate.com/recipes/454322-type-checking-dec...
[ Parent
| on HN ]