[Tutor] A range of numbers

Leung Cris krazie_mu_boi at hotmail.com
Mon Dec 1 21:18:32 EST 2003


....Dun realy get it.


>From: Daniel Ehrenberg <littledanehren at yahoo.com>
>To: pytutor <tutor at python.org>
>Subject: Re: [Tutor] A range of numbers
>Date: Mon, 1 Dec 2003 18:11:52 -0800 (PST)
>
>
>--- Leung Cris <krazie_mu_boi at hotmail.com> wrote:
> > Forgot to tell you guys, if I don't get my mouse to
> > the graphics screen, the mouse_position() will
> > return None instead of a (x,y) . here's the error I
> > wud get:
> >
> > Traceback (most recent call last):
> >   File "<pyshell#3>", line 1, in ?
> >     func()
> >   File "<pyshell#0>", line 6, in func
> >     x,y = mouse_position()
> > TypeError: unpack non-sequence
>
>Then catch the error. Here's just the unpacking part
>of the code with the error caught:
>
>try:
>     x, y = mouse_position()
>except:
>     x, y = 0, 0
>
>Daniel Ehrenberg
>
>__________________________________
>Do you Yahoo!?
>Free Pop-Up Blocker - Get it now
>http://companion.yahoo.com/
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor

_________________________________________________________________
¦b±zªº¦æ°Ê¸Ë¸m¤W¶Ç°e±µ¦¬ Hotmail ¶l¥ó¡A½Ð²¾¦Ü: http://zh-asiasms.mobile.msn.com 




More information about the Tutor mailing list