V
v4vijayakumar
I saw some code where someone is really managed to import braces from
__future__.
def test():
#{
print "hello"
#}
__future__.
def test():
#{
print "hello"
#}
v4vijayakumar said:I saw some code where someone is really managed to import braces from
__future__.
def test():
#{
print "hello"
#}
Roy said:That usage is obsolete. Current best practice is:
def test():
"""{"""
print "hello"
"""}"""
Steve Holden said:Which would be OK if it were syntactically valid ...
regards
Steve
Roy said:Doh. I'm sorry:
def test():
"""{"""
print "hello"
"""}"""
This one I tested
I saw some code where someone is really managed to import braces from
__future__.
def test():
#{
print "hello"
#}
Brendan Miller said:Yes, I also recently noticed the bug in python's parser that doesn't
let it handle squigly braces and the bug in the lexer that makes white
space significant. I'm surprised the dev's haven't noticed this yet.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.