Kaydet (Commit) ef8dc06c authored tarafından Fred Drake's avatar Fred Drake

compile(): Use the __debug__ flag to determine the proper filename extension

	to use for the cached module code object.
üst 6af0c00a
......@@ -19,7 +19,7 @@ def compile(file, cfile = None):
timestamp = long(os.stat(file)[8])
codeobject = __builtin__.compile(codestring, file, 'exec')
if not cfile:
cfile = file + 'c'
cfile = file + (__debug__ and 'c' or 'o')
fc = open(cfile, 'wb')
fc.write(MAGIC)
wr_long(fc, timestamp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment