The special ’__xxx__’ variables in python
• In Python, the variable names ’__xxx__’ are special
• Two underscores ’_’ at each end of a word
• Some are created automatically during execution
– __name__, __file__, __doc__, __builtins__
• Some control the execution in different ways
• Only set the value of one when you know what you are doing!
• Don’t use this type of name for your own stuff!
No comments:
Post a Comment