Skip to content

Instantly share code, notes, and snippets.

@ymyzk
Created December 17, 2014 17:02
Show Gist options
  • Save ymyzk/023f34bab3c46012a2c1 to your computer and use it in GitHub Desktop.
Save ymyzk/023f34bab3c46012a2c1 to your computer and use it in GitHub Desktop.
Python while 1 vs. while True
import dis
def while_1():
while 1:
pass
def while_true():
while True:
pass
if __name__ == '__main__':
dis.dis(while_1)
dis.dis(while_true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment