Skip to content

Instantly share code, notes, and snippets.

@paniq
Created September 27, 2015 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paniq/fe74e65c90003d19e356 to your computer and use it in GitHub Desktop.
Save paniq/fe74e65c90003d19e356 to your computer and use it in GitHub Desktop.
Python:
def myfunc (x):
print(x)
def myotherfunc (x):
# typo: error only becomes visible when myotherfunc
# is called.
myfun(x)
Lua:
local function myfunc (x)
print(x)
end
local function myotherfunc (x)
-- same problem: not visible until myotherfunc
-- is called
myfun(x)
end
new None rule for globals:
function myfunc (x)
print x
function myotherfunc (x)
; error on load: myfun
; is not an existing global
myfun x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment