Skip to content

Instantly share code, notes, and snippets.

@alvesjnr
Created April 30, 2012 12:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvesjnr/a1f65d9960237a2652c0 to your computer and use it in GitHub Desktop.
Save alvesjnr/a1f65d9960237a2652c0 to your computer and use it in GitHub Desktop.
"""
Python is not Java
"""
import sys
def print_value(value):
sys.stdout.write(str(value) + '\n')
class PrintValue(object):
def __init__(self):
pass
def __call__(self,value):
sys.stdout.write(str(value) + '\n')
if __name__ == '__main__':
" Why do you do this: "
pv = PrintValue()
pv(666)
" Instead of just do it: "
print_value(42)
" ?? "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment