-
-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
From: #508
print! __file__
$ erg test.er
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "test.er", line -1, in <module>
NameError: name '__file__' is not defined. Did you mean: '__name__'?Erg does not create files (on Unix) when executing Python bytecode. That is, __file__ is not set. Even if the compiler creates the file, it will be created in the temporary directory, so it won't work as intended anyway.
The compiler must embed the contents of this variable at compile time.
Originally posted by @toddlerer in #508 (comment)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working