braces fixed '#{' and '#}'

Martin P. Hellwig martin.hellwig at dcuktec.org
Sat Jan 17 14:40:45 EST 2009


Roy Smith wrote:
> In article <mailman.7442.1232204734.3487.python-list at python.org>,
>  Steve Holden <steve at holdenweb.com> wrote:
> 
>> Roy Smith wrote:
>>> In article 
>>> <6264e675-ddd4-446a-822a-cc82e8f87446 at w1g2000prk.googlegroups.com>,
>>>  v4vijayakumar <vijayakumar.subburaj at 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



More information about the Python-list mailing list