I wrote this little Python program using CPython 3.5.2. It's ...
interesting ... that we apparently don't need comments or pass
statements any more. Anyone else think it might be worth tightening up
the grammar definition and parser a bit?
def empty():
"""Don't do anything"""
def helloWorld():
"""Docstring"""
x = 0
if x > 0:
"""Pass"""
else:
x += 1
print(x)
"""Comment that is a string or vice versa"""
x = 2
print(x)
if x == 2:
x += 1 ;"Add 1 to x"
print(x)
if x == 3:
42
print("Answered everything")
if __name__ == "__main__":
helloWorld()
print(empty())
--
cheers,
Hugh Fisher
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/