Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6455

Re: Beginner needs advice

From Thorsten Kampe <thorsten@thorstenkampe.de>
Newsgroups comp.lang.python
Subject Re: Beginner needs advice
Date 2011-05-28 08:38 +0200
Message-ID <MPG.284ab6e5dded381d98981a@news.individual.de> (permalink)
References (4 earlier) <BANLkTi=JCsVG1K++rz=VAgh_NSVXLe4Edw@mail.gmail.com> <mailman.2070.1306328295.9059.python-list@python.org> <VJODp.4281$wM1.3392@newsfe05.iad> <4ddfc8ae$0$29996$c3e8da3$5496439d@news.astraweb.com> <irpvtd$ra2$1@r03.glglgl.eu>

Show all headers | View raw


* Thomas Rachel (Sat, 28 May 2011 07:06:53 +0200)
> Am 27.05.2011 17:52 schrieb Steven D'Aprano:
> > On Fri, 27 May 2011 09:40:53 -0500, harrismh777 wrote:
> >> 3.x is completely incompatible with 2.x (some call it a dialect,
> >> but that is a lie).
> >
> > "Completely incompatible"? A "lie"?
> 
> Hard word, but it is true. Many things can and will fall on your feet
> when moving.

I think we should stop talking about (in)compatability because everyone 
seems to associate something different with that term (incompatible = 
"no Python2 to code will run with Python3", "not all Python2 code will 
run with Python3").

The question is: if you want (or have) to run your code under Python3, 
how likely is that it will run unmodified? My experience is: unless the 
code is especially written with Python3 compatability or just a short 
snippet, it's actually quite unlikely that it will run.

I modified three programs/modules (none of them written with Python3 in 
mind - I was thinking that Python 3000 would come out some day after 
Perl 6, PHP 6 and GNU Hurd; how could I know that the Python developers 
actually mean business?)

One is a tool box kind of module. I had to insert lots of "list()" and 
add a complete function that would deal with the different behaviour of 
"sort". Probably easy to find the problems if you have extensive unit 
tests but without it was a tedious nightmare.

The second a kind of script template. gettext.install has no "unicode = 
True". Easy fix but I wondered why Python 3 does not ignore the keyword 
simply.

The third, a more real world complete application using PyQt. Took me 
about a day to fix. The problem was not just with the code but also with 
the tools (pyuic4, pyrcc4). Without the PyQt mailing list this wouldn't 
have been possible. Still: a complete workday (or even more) for 150 
lines of code.


Thorsten

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Beginner needs advice "Colin J. Williams" <cjw@ncf.ca> - 2011-05-25 08:57 -0400
  Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-27 09:40 -0500
    Re: Beginner needs advice Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-27 15:52 +0000
      Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-27 15:40 -0500
        Re: Beginner needs advice Chris Angelico <rosuav@gmail.com> - 2011-05-28 09:09 +1000
          Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-27 20:02 -0500
            Re: Beginner needs advice Ethan Furman <ethan@stoneleaf.us> - 2011-05-27 18:30 -0700
              Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-28 14:21 -0500
                Re: Beginner needs advice Chris Angelico <rosuav@gmail.com> - 2011-05-29 05:47 +1000
                Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-28 21:02 -0500
                Re: Beginner needs advice Chris Angelico <rosuav@gmail.com> - 2011-05-29 12:26 +1000
                Re: Beginner needs advice Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 14:09 +0000
                Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-30 19:32 -0500
                Re: Beginner needs advice "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2011-05-31 01:58 +0100
                Re: Beginner needs advice Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-30 22:20 -0700
                Re: Beginner needs advice Ben Finney <ben+python@benfinney.id.au> - 2011-05-31 15:48 +1000
                Re: Beginner needs advice MRAB <python@mrabarnett.plus.com> - 2011-05-31 17:59 +0100
                Re: Beginner needs advice Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-31 10:22 -0700
                Re: Beginner needs advice Terry Reedy <tjreedy@udel.edu> - 2011-05-30 21:34 -0400
                Re: Beginner needs advice Terry Reedy <tjreedy@udel.edu> - 2011-05-30 21:47 -0400
                Re: Beginner needs advice Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-30 22:20 -0700
                Re: Beginner needs advice Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-05-30 22:35 -0700
            Re: Beginner needs advice Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-28 05:40 +0000
        Re: Beginner needs advice Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-28 06:15 +0000
          Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-28 21:33 -0500
            Re: Beginner needs advice Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-29 02:06 -0600
              Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-30 19:43 -0500
                Re: Beginner needs advice Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-30 19:16 -0600
                Re: Beginner needs advice Chris Angelico <rosuav@gmail.com> - 2011-05-31 12:27 +1000
                Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-30 22:02 -0500
            Re: Beginner needs advice Jason Tackaberry <tack@urandom.ca> - 2011-05-29 15:28 -0400
              Re: Beginner needs advice rantingrick <rantingrick@gmail.com> - 2011-05-29 16:00 -0700
                Re: Beginner needs advice Chris Angelico <rosuav@gmail.com> - 2011-05-30 09:31 +1000
              Re: Beginner needs advice harrismh777 <harrismh777@charter.net> - 2011-05-30 19:44 -0500
            Re: Beginner needs advice rantingrick <rantingrick@gmail.com> - 2011-05-29 15:15 -0700
            Re: Beginner needs advice Dotan Cohen <dotancohen@gmail.com> - 2011-05-31 20:56 +0300
            Re: Beginner needs advice Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-31 12:29 -0600
            Re: Beginner needs advice Dotan Cohen <dotancohen@gmail.com> - 2011-05-31 21:42 +0300
        Re: Beginner needs advice Dotan Cohen <dotancohen@gmail.com> - 2011-05-29 08:46 +0300
      Re: Beginner needs advice Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-05-28 07:06 +0200
        Re: Beginner needs advice Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-05-28 08:38 +0200
          Re: Beginner needs advice Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-05-28 08:42 +0200
          Re: Beginner needs advice Chris Angelico <rosuav@gmail.com> - 2011-05-28 16:44 +1000
          Re: Beginner needs advice Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-28 08:13 +0000
        Re: Beginner needs advice "D'Arcy J.M. Cain" <darcy@druid.net> - 2011-05-28 08:38 -0400

csiph-web