Threading KeyError in Python 3.3 beta 2?

Chris Angelico rosuav at gmail.com
Mon Aug 13 07:39:13 EDT 2012


On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram <noname at 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.

ChrisA



More information about the Python-list mailing list