[Python-3000] u'text' as an alias for 'text'?

Georg Brandl g.brandl at gmx.net
Fri Mar 21 10:05:12 CET 2008


Amaury Forgeot d'Arc schrieb:
> Ralf Schmitt wrote:
>>
>> On Thu, Mar 20, 2008 at 1:30 PM, Lennart Regebro <regebro at gmail.com> wrote:
>> >
>> > On Thu, Mar 20, 2008 at 1:16 PM, "Martin v. Löwis" <martin at v.loewis.de>
>> wrote:
>> > >  However, it *is* common to install Python code before running it.
>> >
>> > Not every time you make a change in the code.
>> >
>>
>> I also happen to have test code that will not be installed with python
>> setup.py install, so I would have to manually convert that.
> 
> What about using sys.path_hooks to run 2to3 on the fly at import time?
> It would cache its results, of course.
> 

See http://dev.pocoo.org/hg/sandbox/file/tip/auto2to3.py  - it's awfully
slow.

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.



More information about the Python-3000 mailing list