In Python there is a built-in function called dir
. This is used to get a list of all the attributes for an object.
I understand what it does, but I am confused about why it is called dir
. How is this name related to getting the attributes from an object?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…