It makes sense - what would you suggest to specify lines/features to exclude?


On 7/15/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
> In order to have a codebase run in 2.x and 3.x, via automated translated by
> 2to3, there should be some "exclusion feature" for single lines that tells
> the refactorer not to touch those lines.
>
> For example, if you have some object that still has an iteritems() method and
> keeps it, it'll have to stay the same during translation.
> Same goes, e.g., for methods named next(), has_key() etc.
>
> Most obvious would be a special comment, something like
>
> for x in curiousobject.iteritems():  # 2to3:keep
>      foo(x)
>
> Does that make sense?
>
> Georg
>
> --
> Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
> Four shall be the number of spaces thou shalt indent, and the number of thy
> indenting shall be four. Eight shalt thou not indent, nor either indent thou
> two, excepting that thou then proceed to four. Tabs are right out.
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000@python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-3000/python3now%40gmail.com
>
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to