lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Aug 12, 2020 at 11:06 PM Sam Trenholme wrote:
Here is a related ugly Lua/Python polyglot:

#!/usr/bin/env python
_rem={}
_rem={ #_rem --[=[
}
# Python code
""" # ]=] }
-- Lua code
_rem={ #_rem --[=[
""" # } ]=] }



Let me rewrite it a bit:

#!/usr/bin/env python
_rem=(#''--[=[
);del _rem

# Python code
print"Hello from Python!"

"""]=]and _rem)

-- Lua code
print"Hello from Lua"

--"""