Re: Problem with -3 switch

2009-01-12 Thread Steve Holden
Christian Heimes wrote: >>> Perhaps you also like to hear from a developer who has worked on Python >>> 3.0 itself and who has done lots of work with internationalized >>> applications. If you want to get it right you must >>> >>> * decode incoming text data to unicode as early as possible >>> * us

Re: Problem with -3 switch

2009-01-12 Thread Дамјан Георгиевски
> Perhaps you also like to hear from a developer who has worked on > Python 3.0 itself and who has done lots of work with internationalized > applications. If you want to get it right you must > > * decode incoming text data to unicode as early as possible > * use unicode for all internal text dat

Re: Problem with -3 switch

2009-01-12 Thread Carl Banks
On Jan 12, 5:03 pm, John Machin wrote: > On Jan 13, 6:12 am, Christian Heimes wrote: > > > > I say again, show me a case of working 2.5 code where prepending u to > > > an ASCII string constant that is intended to be used in a text context > > > is actually worth the keystrokes. > > > Eventually

Re: Problem with -3 switch

2009-01-12 Thread John Machin
On Jan 13, 6:12 am, Christian Heimes wrote: > > I say again, show me a case of working 2.5 code where prepending u to > > an ASCII string constant that is intended to be used in a text context > > is actually worth the keystrokes. > > Eventually you'll learn it the hard way. *sigh* And the hard w

Re: Problem with -3 switch

2009-01-12 Thread Carl Banks
On Jan 12, 5:26 am, John Machin wrote: > On Jan 12, 7:29 pm, Carl Banks wrote: > > > > > On Jan 12, 12:32 am, John Machin wrote: > > > > On Jan 12, 12:23 pm, Carl Banks wrote: > > > > > On Jan 9, 6:11 pm, John Machin wrote: > > > > > > On Jan 10, 6:58 am, Carl Banks wrote: > > > > > > I expec

Re: Problem with -3 switch

2009-01-12 Thread Christian Heimes
> I say again, show me a case of working 2.5 code where prepending u to > an ASCII string constant that is intended to be used in a text context > is actually worth the keystrokes. Eventually you'll learn it the hard way. *sigh* Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with -3 switch

2009-01-12 Thread John Machin
On Jan 13, 12:06 am, Christian Heimes wrote: > >> Perhaps you also like to hear from a developer who has worked on Python > >> 3.0 itself and who has done lots of work with internationalized > >> applications. If you want to get it right you must > > >> * decode incoming text data to unicode as ea

Re: Problem with -3 switch

2009-01-12 Thread Christian Heimes
>> Perhaps you also like to hear from a developer who has worked on Python >> 3.0 itself and who has done lots of work with internationalized >> applications. If you want to get it right you must >> >> * decode incoming text data to unicode as early as possible >> * use unicode for all internal tex

Re: Problem with -3 switch

2009-01-12 Thread John Machin
On Jan 12, 11:05 pm, Christian Heimes wrote: > John Machin schrieb: > > > And therefore irrelevant. > > No, Carl is talking about the very same issue. > > > I would like to hear from someone who has actually started with > > working 2.x code and changed all their text-like "foo" to > > u"foo" [exc

Re: Problem with -3 switch

2009-01-12 Thread Christian Heimes
John Machin schrieb: > And therefore irrelevant. No, Carl is talking about the very same issue. > I would like to hear from someone who has actually started with > working 2.x code and changed all their text-like "foo" to > u"foo" [except maybe unlikely suspects like open()'s mode arg]: > * how m

Re: Problem with -3 switch

2009-01-12 Thread John Machin
On Jan 12, 7:29 pm, Carl Banks wrote: > On Jan 12, 12:32 am, John Machin wrote: > > > > > > > On Jan 12, 12:23 pm, Carl Banks wrote: > > > > On Jan 9, 6:11 pm, John Machin wrote: > > > > > On Jan 10, 6:58 am, Carl Banks wrote: > > > > > I expect that it'd be a PITA in some cases to use the tr

Re: Problem with -3 switch

2009-01-12 Thread Carl Banks
On Jan 12, 12:32 am, John Machin wrote: > On Jan 12, 12:23 pm, Carl Banks wrote: > > > > > On Jan 9, 6:11 pm, John Machin wrote: > > > > On Jan 10, 6:58 am, Carl Banks wrote: > > > > > On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > > > > > > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote:

Re: Problem with -3 switch

2009-01-12 Thread Steve Holden
Carl Banks wrote: > On Jan 9, 6:11 pm, John Machin wrote: >> On Jan 10, 6:58 am, Carl Banks wrote: [...] >> Steve & Cliff are talking about the rather small subset of Python that >> is not only valid syntax in both 2.x and 3.x but also has the same >> meaning in 2.x and 3.x. > > That would be a

Re: Problem with -3 switch

2009-01-11 Thread John Machin
On Jan 12, 12:23 pm, Carl Banks wrote: > On Jan 9, 6:11 pm, John Machin wrote: > > > > > > > On Jan 10, 6:58 am, Carl Banks wrote: > > > > On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > > > > > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > > > > > Aivar Annamaa wrote: > > > > > >> As w

Re: Problem with -3 switch

2009-01-11 Thread Carl Banks
On Jan 9, 6:11 pm, John Machin wrote: > On Jan 10, 6:58 am, Carl Banks wrote: > > > > > On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > > > > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > > > > Aivar Annamaa wrote: > > > > >> As was recently pointed out in a nearly identical thread, the

Re: Problem with -3 switch

2009-01-09 Thread John Machin
On Jan 10, 6:58 am, Carl Banks wrote: > On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > > > > > > > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > > > Aivar Annamaa wrote: > > > >> As was recently pointed out in a nearly identical thread, the -3 > > > >> switch only points out problems tha

Re: Problem with -3 switch

2009-01-09 Thread Carl Banks
On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > > Aivar Annamaa wrote: > > >> As was recently pointed out in a nearly identical thread, the -3 > > >> switch only points out problems that the 2to3 converter tool can't > > >> automatically fix. C

Re: Problem with -3 switch

2009-01-09 Thread J. Cliff Dyer
On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > Aivar Annamaa wrote: > >> As was recently pointed out in a nearly identical thread, the -3 > >> switch only points out problems that the 2to3 converter tool can't > >> automatically fix. Changing print to print() on the other hand is > >> ea

Re: Problem with -3 switch

2009-01-09 Thread Steve Holden
Aivar Annamaa wrote: >> As was recently pointed out in a nearly identical thread, the -3 >> switch only points out problems that the 2to3 converter tool can't >> automatically fix. Changing print to print() on the other hand is >> easily fixed by 2to3. >> >> Cheers, >> Chris >> > > I see. > So i g

Re: Problem with -3 switch

2009-01-09 Thread Aivar Annamaa
As was recently pointed out in a nearly identical thread, the -3 switch only points out problems that the 2to3 converter tool can't automatically fix. Changing print to print() on the other hand is easily fixed by 2to3. Cheers, Chris I see. So i gotta keep my own discipline with print() then :

Re: Problem with -3 switch

2009-01-09 Thread Chris Rebert
On Fri, Jan 9, 2009 at 9:17 AM, Aivar Annamaa wrote: > Hi > > I'm getting started with Python and in order to get good habits for Python > 3, i'd like to run my Python 2.6.1 with Python 3 warning mode. > > When i run > python -3 > > and execute statement print 4 > > then i expect to see a war