-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Now, use help("__name__")
and some other special variables' names will still get the help from their class. I think that we can add the useful help on them. For example:
>>>help("__name__")
1. module.__name__ : if the module is run as the main module, the value is ‘_main_‘, or the name is the filename of the module. For example:if __name__ == "__main__": ...can control which code don’t run when the module is imported.
2. cls.__name__: the name of the class. It must be str.
For other special variables (such as __file__
), we can alse print the similar detailed help. And I think that the sentences need to be friendly.
Also welcome to give the ideals on new ideas
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement