Timeline for Simple python calculator
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S May 1, 2016 at 11:37 | history | suggested | zondo | CC BY-SA 3.0 |
Add a space before "def main" to put it in a code block; minor punctuation improvements to get it up to six characters changed
|
May 1, 2016 at 11:36 | review | Suggested edits | |||
S May 1, 2016 at 11:37 | |||||
May 1, 2016 at 11:19 | comment | added | zondo | @BlitzRakete: It's a pleasure. For more information, see What does if __name__ == “__main__” do? | |
May 1, 2016 at 11:18 | history | edited | Peilonrayz♦ | CC BY-SA 3.0 |
Added the main function.
|
May 1, 2016 at 11:14 | comment | added | zondo |
@BlitzRakete: Only if it is __main__ . If you were to do it whatever __name__ equaled, the if would be pointless. As it is, it is checking if the file is being run as a program vs. being imported.
|
|
May 1, 2016 at 11:13 | comment | added | Rakete1111 |
should I only call the main function if __name__ is equal to __main__ , or should I just call it, ignoring it?
|
|
May 1, 2016 at 11:10 | vote | accept | Rakete1111 | ||
May 1, 2016 at 11:09 | comment | added | Rakete1111 |
Thanks! I didn't know about operators
|
|
May 1, 2016 at 10:55 | history | answered | Peilonrayz♦ | CC BY-SA 3.0 |