180
181
182def docker_build(c, instructions, files=[], nocache=False):
183 with tempfile.TemporaryDirectory() as dir:184 with open(dir + "/Dockerfile", "w") as stream:
185 stream.write(instructions)
186 for fname in files:
Defining a local variable or function with the same name as a built-in object makes the built-in object unusable within the current scope and makes the code prone to bugs.
dict = {} # dict is a Python builtin!
for idx, student in enumerate(students):
dict[student] = idx
roll_number = {}
for idx, student in enumerate(students):
roll_number[student] = idx