Re: [Python-3000] u'text' as an alias for 'text'? On Mon, 24 Mar 2008 09:06:29 +0100
> >  It really does appear that, for such a project (and I think two of
> >  mine - python-xlib & plwm - qualify) 2.5->2.6 and 2.6->3.0 aren't that
> >  far apart. You can write code for the old version, and run it (with
> >  suitable preprocessing) on the new version. You can't use features
> >  available in the new version until everyone is off the old version.
> 
> Note how this is libraries with a small set of developers and a well
> defined API that gets released on (ir)regular intervals and whos users
> use the release. Just the type of project I many times agreed 2to3
> will work well on.

That description fits python-xlib, but not plwm, which is a framework
for building window managers. And people are a lot more sensitive
about window managers (at least the kind of people who build their
own) than web sites.

> >  Um, I hate to tell you this, but the vast majority of programmers
> >  debug a different version of the code than they write, because they
> >  are using a compiled language. They write in a nice character based
> >  language like C, but then debug a binary machine code. Yeah, smart
> >  compilers and debuggers help, by building a mapping from the machine
> >  code back to the character code, and then using it so it looks like
> >  you're debugging the character code.
> >
> >  Which brings up a feature request for 2to3/3.0: the ability to leave
> >  cookies in the 3.0 file that "smart" debuggers can use to help with
> >  debugging code from 2to3? At the very least, each time a line is
> >  changed, the ability to add a comment with the original line and the
> >  file and line number it came from.
> 
> A complicated solution for a problem that isn't necessary, and only
> solves it if you are using a smart debugger...

Complicated? Really? On extra option, and an optional print when you
emit a line? And if you don't read the 2to3 code when debugging, or
don't consider yourself smart, I'd say that's your problem. Seriously,
the pdb 'l' command will shows you the source file when you're
debugging with it. Having a comment there that the code you're looking
at was generated by 2to3 should help avoid confusion if you decide
that's what needs to change.

      		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
_______________________________________________
Python-3000 mailing list
smsbmo-9552@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: http://mail.python.org/mailman/options/python-3000/python-3000%40tangomu.com


