fluentpython / example-code

Example code for the book Fluent Python, 1st Edition (O'Reilly, 2015)
http://bit.ly/fluentpy
MIT License
5.56k stars 2.18k forks source link

Add argument to str.format on line 11 #42

Closed EONRaider closed 4 years ago

EONRaider commented 4 years ago

Without an argument, the usage statement generated an IndexError exception when calling the print() function. Adding the 'sys.argv[0]' argument to str.format solves the problem.