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


Groups > comp.lang.python > #26983

Re: Threading KeyError in Python 3.3 beta 2?

From "Blind Anagram" <noname@nowhere.com>
Newsgroups comp.lang.python
References <mbCdndneF4sgRbXNnZ2dnUVZ7vWdnZ2d@brightview.co.uk><mailman.3222.1344856408.4697.python-list@python.org><naadncJkoMyRebXNnZ2dnUVZ8mqdnZ2d@brightview.co.uk> <mailman.3223.1344857956.4697.python-list@python.org>
Subject Re: Threading KeyError in Python 3.3 beta 2?
Date 2012-08-13 12:51 +0100
Message-ID <uoCdnWeILZetd7XNnZ2dnUVZ7rKdnZ2d@brightview.co.uk> (permalink)

Show all headers | View raw


"Chris Angelico"  wrote in message 
news:mailman.3223.1344857956.4697.python-list@python.org...

On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram <noname@nowhere.com> wrote:
>
> Here is a fairly short bit of code which produces the exception:
>
> for pre in ('12', '13', '14', '15', '21' ):
>  n = int(pre + '543')
>  s = str(n * n)
>  if len(set(s)) == 9:
>    print(n, s)

Interesting. I just downloaded a clean 3.3 onto this Windows box,
saved your script to a file ("booom.py" hehe), and ran it - no
exception. Same thing pasting that code into the interactive
interpreter or idle. Did you import anything before running that code?
If not, it may be a site.py problem or something.

===============
Thanks to you both for your responses.

Its an IDE issue of some kind (I am using WING).

When I run under a command prompt (or IDLE) all is well.

Sorry to have bothered you.

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


Thread

Threading KeyError in Python 3.3 beta 2? "Blind Anagram" <noname@nowhere.com> - 2012-08-13 11:36 +0100
  Re: Threading KeyError in Python 3.3 beta 2? Chris Angelico <rosuav@gmail.com> - 2012-08-13 21:13 +1000
    Re: Threading KeyError in Python 3.3 beta 2? "Blind Anagram" <noname@nowhere.com> - 2012-08-13 12:24 +0100
      Re: Threading KeyError in Python 3.3 beta 2? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-13 11:38 +0000
        Re: Threading KeyError in Python 3.3 beta 2? Chris Angelico <rosuav@gmail.com> - 2012-08-13 21:47 +1000
      Re: Threading KeyError in Python 3.3 beta 2? Chris Angelico <rosuav@gmail.com> - 2012-08-13 21:39 +1000
        Re: Threading KeyError in Python 3.3 beta 2? "Blind Anagram" <noname@nowhere.com> - 2012-08-13 12:51 +0100
          Re: Threading KeyError in Python 3.3 beta 2? Chris Angelico <rosuav@gmail.com> - 2012-08-13 21:59 +1000

csiph-web