News for hackers. Stuff that matters.
Re:A few things to remember while coding in Python by StavrosK on Sunday May 20, 2012 @01:56PM (#3999491)
I'm a Python veteran, and, if you do it like this, I'll shoot you.

Add a @memoize decorator and do it there, you need to always be as obvious as possible. Compare:

    @memoize
    def fibonacci(n): pass
    
    def fibonacci(n, memory=[]): pass
You don't even need documentation for the first example.
Re:A few things to remember while coding in Python by paulmcpazzi on Monday May 21, 2012 @07:22AM (#4002291)
Starting from Python 3.2 there is a builtin decorator: http://docs.python.org/dev/library/functools.html#functools....
Re:A few things to remember while coding in Python by StavrosK on Monday May 21, 2012 @08:19AM (#4002480)
That's fantastic, thanks for the link.