Created
October 28, 2010 09:45
-
-
Save solex/651027 to your computer and use it in GitHub Desktop.
Antigravity usage example
This file contains 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 Dummy(object): | |
answer = 42 | |
class Foo: | |
pass | |
class Bar: | |
spam = "eggs" | |
import antigravity | |
print Dummy.altitude #18 | |
print Dummy.fly() #Flying at the height of 18 lines. At the very top, above the "Foo". It's all Python! (http://xkcd.com/353/) | |
print Foo().fly() #Flying at the height of 14 lines. Between "Bar" and "Dummy". It's all Python! (http://xkcd.com/353/) | |
print Bar.fly() #Flying at the height of 10 lines. At the very bottom, below the "Foo". It's all Python! (http://xkcd.com/353/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment