Skip to content

Instantly share code, notes, and snippets.

@stober
Created August 30, 2012 17:41

Revisions

  1. stober created this gist Aug 30, 2012.
    12 changes: 12 additions & 0 deletions static.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/usr/bin/env python
    '''
    @author jstober
    '''

    def test_static(static=[0]):
    static[0] += 1
    return static[0]

    print test_static() # 1
    print test_static() # 2
    print test_static() # 3