1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-22 02:54:25 +01:00

Fix Python 3 compatibility in the irrelevant code! (#86)

This commit is contained in:
cclauss 2018-06-21 21:47:51 +02:00 committed by Satwik Kansal
parent 07861a045d
commit 2fb04501f7

View File

@ -2,7 +2,7 @@
""" """
This inefficient module would parse the README.md in the initial version of This inefficient module would parse the README.md in the initial version of
WTFPython, and enabl me to categorize and reorder a hell lot of examples with WTFPython, and enable me to categorize and reorder a hell lot of examples with
the help of the file `add_categories` (part of which is automatically the help of the file `add_categories` (part of which is automatically
generated). generated).
@ -10,6 +10,12 @@ After the refactor, this module would not work now with necessary updates in
the code. the code.
""" """
try:
raw_input # Python 2
except NameError:
raw_input = input # Python 3
fname = "README.md" fname = "README.md"
snippets = [] snippets = []