2.1 vs. 2.2

Paul Magwene p.magwene at snet.net
Sat Apr 13 20:23:07 EDT 2002


On Sat, 13 Apr 2002 21:00:33 -0400, Jens Baader wrote:


> "Terry Reedy" <tejarex at yahoo.com> schrieb im Newsbeitrag
> news:WL2u8.26958$GS6.2775752 at bin3.nnrp.aus1.giganews.com...
> 
> I see. Thank you for your answers.
> 
> BTW, try this in interactive mode:
> 
> "The Python interpreter is very stable"*30000
> 
> At least at my system the interpreter promptly hangs itself. I guess I
> just found my first bug.. (not bad I just read the first few pages of
> the tutorial)
> 
> 
No, what you just encountered was the behavior of IDLE (a Tkinter based
interface to Python) when presented with large strings .  Eventually IDLE
will spit out the string - it took several minutes on one of my machines.
That's a "fault" of IDLE not of the language.

>From a purely text based command-prompt (bash on Unix or the Dos box on
Windows) there's no problem at all, either on Unix or Windows (though my
Unix boxes spit it out faster!).

If you try this:

>>> s = "I'm a snotty newcomer with an attitude" * 30000

You'll see that it returns almost immediately.

HTH,
Paul



More information about the Python-list mailing list