We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
NameError
Jump to navigation
Jump to search
NameError is an esolang created by Mihai Popa and inspired by foo : The term 'foo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. which is inspired by bash: foo: No such file or directory. It imitates another Python error which is also common for beginners - Name error.
semantics
Every program is valid, and prints:
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name '[program]' is not defined
Interpreter
Batch
@echo off :bad set /p x=^>^>^> echo Traceback (most recent call last): echo File "<stdin>", line 1, in ^<module^> echo NameError: name '%x%' is not defined goto bad
Python
print('\n'.join([f' File "<stdin>", line 1\n {i}\n\nNameError: name \'{}\' is not defined'.format(i) for i in __import__('sys').stdin.read().split('\n')]))
Another Python interpreter
raise NameError(f"name '{}' is not defined".format(i) for i in __import('sys').stdin.read.split('\n'))
A third Python interpreter
[command]
A fourth Python interpreter
raise NameError(f"Name '{input()}' is not defined")
Free2Edit
+5+5<<Traceback(most recent call last):>>oc << File "<stdin>", line 1, in <module\>>>oc <<NameError: name '>>gc-5-5ws+5+5ocgc-5-5we<<' is not defined>>