Skip to content

Commit 6d1a190

Browse files
authored
Merge pull request #3477 from python-discord/nedbat/tighter
embeds render differently. tighten this up.
2 parents 954b218 + 0e031e5 commit 6d1a190

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

bot/resources/tags/if-name-main.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@ embed:
55
---
66

77
This is a convention for code that should run if the file is the main file of your program:
8-
98
```py
109
def main():
1110
...
1211

1312
if __name__ == "__main__":
1413
main()
1514
```
15+
If the file is run directly, then the `main()` function will be run. If the file is imported, it will not run.
1616

17-
If the file is run directly, then the `main()` function will be run.
18-
If the file is imported, it will not run.
19-
20-
For more about why you would do this and how it works, see
21-
[`if __name__ == "__main__"`](https://pythondiscord.com/pages/guides/pydis-guides/if-name-main/).
17+
For more about why you would do this and how it works, see [`if __name__ == "__main__"`](https://pythondiscord.com/pages/guides/pydis-guides/if-name-main/).

0 commit comments

Comments
 (0)