This post originated from an RSS feed registered with Python Buzz
by Dmitry Dvoinikov.
Original Post: Method signature type checking decorator for Python 3000
Feed Title: Things That Require Further Thinking
Feed URL: http://feeds.feedburner.com/ThingsThatRequireFurtherThinking
Feed Description: Once your species has evolved language, and you have learned language, [...] and you have something to say, [...] it doesn't take much time, energy and effort to say it. The hard part of course is having something interesting to say.
-- Geoffrey Miller
It is much cleaner that the similar decorator I have previously written for Python 2.x, the used Python 3000 function annotations make it better for the following reasons:
1. The signature-related piece of syntax is right there where it belongs - next to the parameter. Where I used to write