?

Log in

No account? Create an account

Previous Entry | Next Entry

Note To Self: Python's Apply

Self, discover why args has to be manipulated the way it does.
def fprintf(file,fmt, *args):
file.write(fmt % args)

def printf(fmt, *args):
apply(fprintf, (sys.stdout,fmt)+args)