Created
April 22, 2010 20:46
-
-
Save NicolasT/375797 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# class Person: | |
# def __init__(self, first_name, last_name, age): | |
# self.first_name = first_name | |
# self.last_name = last_name | |
# self.age = age | |
Person = lambda first_name, last_name, age: \ | |
lambda: (first_name, last_name, age) | |
first_name = lambda person: person()[0] | |
last_name = lambda person: person()[1] | |
age = lambda person: person()[2] | |
Nicolas = Person('Nicolas', 'T', 24) | |
print first_name(Nicolas), last_name(Nicolas), 'is', age(Nicolas) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment