skip to main | skip to sidebar

Beardy Box

Monday, 3 October 2011

Functional Fun with Python

Built in currying:

>>> from functools import  partial 
>>> binary = partial (int, base=2)
>>> binary('000001')
1
>>> binary('000011')
3
>>> binary('001011')
11

Posted by David Kemp at 12:24 No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Morning Brew Link

The Morning Brew - Daily .NET News and Views

Blog Archive

  • ►  2015 (1)
    • ►  July (1)
  • ►  2014 (1)
    • ►  January (1)
  • ▼  2011 (1)
    • ▼  October (1)
      • Functional Fun with Python
  • ►  2010 (2)
    • ►  June (1)
    • ►  January (1)
  • ►  2009 (3)
    • ►  December (1)
    • ►  October (1)
    • ►  January (1)
  • ►  2008 (3)
    • ►  December (1)
    • ►  September (1)
    • ►  June (1)
  • ►  2007 (9)
    • ►  November (1)
    • ►  October (2)
    • ►  September (4)
    • ►  July (1)
    • ►  June (1)
Addicted toThe Most Intelligent Add-In To Visual Studio

About Me

David Kemp
View my complete profile