Pattern: Redefining built-in
Issue: -
Used when a variable or function overrides a built-in. Overloading function names can make code hard to maintain and hard to read, and can cause subtle bugs when the wrong function is called.
Try to rename user-defined function to a name that is not a built-in function.
Example of incorrect code:
def function():
type = 1
print(type)
Example of correct code:
def function():
x = 1
print(x)