Open
Bug 2001134
Opened 2 months ago
Updated 1 month ago
Rename variable "file" in Perfherder metrics to avoid shadowing Python built-in
Categories
(Testing :: mozperftest, enhancement)
Testing
mozperftest
Tracking
(Not tracked)
NEW
People
(Reporter: myeongjun.ko, Unassigned)
References
Details
(Keywords: good-first-bug, Whiteboard: [fxp])
The Perfherder metrics defines a variable named file[0] when writing the perfherder JSON artifact. Since file is a built-in function in Python, overriding it is discouraged and can lead to confusion or subtle bugs.
This variable should be renamed to something more appropriate.
Comment 1•1 month ago
|
||
file as a built-in method has been deprecated in python 3 no?
Flags: needinfo?(myeongjun.ko)
| Reporter | ||
Comment 2•1 month ago
|
||
Thanks for the comment!
Yes, the old file() built-in is gone in Python 3.
Even today, though, file is still a commonly used identifier in Python code, so using it here can be a bit confusing or easy to misread. Renaming it to something more descriptive would simply improve readability.
Thanks again for taking a look.
Flags: needinfo?(myeongjun.ko)
Updated•1 month ago
|
Whiteboard: [fxp]
Updated•1 month ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•