On 7/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
> Most obvious would be a special comment, something like
>
> for x in curiousobject.iteritems(): # 2to3:keep
> foo(x)
>
> Does that make sense?
It would be a good idea to define a convention for these special
comments. For example, we could define something similar to C's
pragma:
#pragma <feature> <option> ...
or perhaps,
#: <feature> <option> ...
So, your example would become:
for x in curiousobject.iteritems(): #pragma 2to3 keep
foo(x)
I expect other tools, like pdb.py and trace.py could follow this
convention as well. For example:
def buggy_func(): #pragma pdb break
pass
if debug: #pragma trace ignore
pass
The motivation for making a such convention, is to make it easy for
programmers to identify comments that are in fact control lines.
-- Alexandre
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com