Re: braces fixed '#{' and '#}'

2009-01-19 Thread Tim Roberts
Brendan Miller catph...@catphive.net wrote:

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.

It's very dangerous to make a post like this without including the smiley.
You're likely to get a mailbox full of helpful corrections...

;)
-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list


braces fixed '#{' and '#}'

2009-01-18 Thread v4vijayakumar
I saw some code where someone is really managed to import braces from
__future__. ;)

def test():
#{
print hello
#}
--
http://mail.python.org/mailman/listinfo/python-list


Re: braces fixed '#{' and '#}'

2009-01-18 Thread Brendan Miller
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.

On Sat, Jan 17, 2009 at 2:09 AM, v4vijayakumar
vijayakumar.subbu...@gmail.com wrote:
 I saw some code where someone is really managed to import braces from
 __future__. ;)

 def test():
 #{
print hello
 #}

This seems like the best workaround.  Hopefully python curly brace
support will be fixed soon. I think technically a language can't be
turing complete without curly braces right? That's definitely how I
read this:

http://www.thocp.net/biographies/papers/turing_oncomputablenumbers_1936.pdf

If the negation of what Gödel has shown had been proved, i.e. if, for each U,
either U or –U is provable, then we should have an immediate solution of the
Entscheidungsproblem. As a corollary we also have that real
programmers use squigly braces and everyone else is nubs
--
http://mail.python.org/mailman/listinfo/python-list


Re: braces fixed '#{' and '#}'

2009-01-17 Thread Roy Smith
In article 
6264e675-ddd4-446a-822a-cc82e8f87...@w1g2000prk.googlegroups.com,
 v4vijayakumar vijayakumar.subbu...@gmail.com wrote:

 I saw some code where someone is really managed to import braces from
 __future__. ;)
 
 def test():
 #{
   print hello
 #}

That usage is obsolete.  Current best practice is:

def test():
{
   print hello
}
--
http://mail.python.org/mailman/listinfo/python-list


Re: braces fixed '#{' and '#}'

2009-01-17 Thread Steve Holden
Roy Smith wrote:
 In article 
 6264e675-ddd4-446a-822a-cc82e8f87...@w1g2000prk.googlegroups.com,
  v4vijayakumar vijayakumar.subbu...@gmail.com wrote:
 
 I saw some code where someone is really managed to import braces from
 __future__. ;)

 def test():
 #{
  print hello
 #}
 
 That usage is obsolete.  Current best practice is:
 
 def test():
 {
print hello
 }

Which would be OK if it were syntactically valid ...

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: braces fixed '#{' and '#}'

2009-01-17 Thread Roy Smith
In article mailman.7442.1232204734.3487.python-l...@python.org,
 Steve Holden st...@holdenweb.com wrote:

 Roy Smith wrote:
  In article 
  6264e675-ddd4-446a-822a-cc82e8f87...@w1g2000prk.googlegroups.com,
   v4vijayakumar vijayakumar.subbu...@gmail.com wrote:
  
  I saw some code where someone is really managed to import braces from
  __future__. ;)
 
  def test():
  #{
 print hello
  #}
  
  That usage is obsolete.  Current best practice is:
  
  def test():
  {
 print hello
  }
 
 Which would be OK if it were syntactically valid ...
 
 regards
  Steve

Doh.  I'm sorry:

def test():
{
print hello
}

This one I tested :-)
--
http://mail.python.org/mailman/listinfo/python-list


Re: braces fixed '#{' and '#}'

2009-01-17 Thread Martin P. Hellwig

Roy Smith wrote:

In article mailman.7442.1232204734.3487.python-l...@python.org,
 Steve Holden st...@holdenweb.com wrote:


Roy Smith wrote:
In article 
6264e675-ddd4-446a-822a-cc82e8f87...@w1g2000prk.googlegroups.com,

 v4vijayakumar vijayakumar.subbu...@gmail.com wrote:


I saw some code where someone is really managed to import braces from
__future__. ;)

def test():
#{
print hello
#}

That usage is obsolete.  Current best practice is:

def test():
{
   print hello
}

Which would be OK if it were syntactically valid ...

regards
 Steve


Doh.  I'm sorry:

def test():
{
print hello
}

This one I tested :-)


print is deprecated use print() :-)

--
mph
--
http://mail.python.org/mailman/listinfo/python-list