root/trunk/infrastructure/pyd/generators/min_args.py

Revision 40, 377 bytes (checked in by KirkMcDonald, 2 years ago)

Meta-programming library replaced; large re-write. StackThreads? updated to 0.3.2. Iteration updates.

Line 
1 import sys
2 old_stdout = sys.stdout
3 sys.stdout = open('min_args.txt', 'w')
4
5 arg_template = """I!(%s)()"""
6
7 template = """\
8 \telse static if (is(typeof(fn(%s))))
9 \t\tconst uint minArgs = %s;"""
10
11 for i in range(21):
12     args = []
13     for j in range(i):
14         args.append(arg_template % (j,))
15     print template % (", ".join(args), i)
16
17 sys.stdout = old_stdout
Note: See TracBrowser for help on using the browser.