печально быть антисоциальным - Post a comment

Aug. 17th, 2006

[info]smejmoon

09:35 pm

es savukārt pirmo reizi mūžā uztaisīju curry. ne to, kurš garšviela, bet to, kur funkcijas ieloka.

def curry(*args, **kwargs):
    function, args = args[0], args[1:]
    def result(*rest, **kwrest):
        combined = kwargs.copy()
        combined.update(kwrest)
        return function(*args + rest, **combined)
    return result

Read Comments

Reply:

From:
( )Anonymous- this user has disabled anonymous posting.
Username:
Password:
Subject:
No HTML allowed in subject
  
Message:

Notice! This user has turned on the option that logs your IP address when posting.