I know to never use built-in function names as variable identifiers.
But are there any reasons not to use them as attribute or method identifiers?
For examp
Yes it's bad practice. It might not immediately break anything for you, but it still hurts readability of the code.
To selectively quote from PEP20:
Beautiful is better than ugly.
Simple is better than complex.
Readability counts.
If the implementation is hard to explain, it's a bad idea.
Seeing a call to myobject.dict() it would be natural to assume that it's going to return myobject.__dict__, or that myobject.id() returns the same thing as id(myobject)
It's possible for them to find out that they're wrong; but that will take time and effort and probably lead to some mistakes while they figure it out. Calling your attribute myobject.object_id_number is much longer, but makes it clearer that it's different to id(myobject)