[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Rect() not imported
2008/12/14 Michael George <mdgeorge@xxxxxxxxxxxxxx>:
> If you import a module, it introduces the name of that module (pygame in
> this case) into the local scope. That means you can access things inside
> that module using that name (e.g. pygame.Rect). On the other hand, the
> from module import name construct imports the name itself. For example, if
> you said from pygame import Rect, then you could use Rect instead of
> pygame.Rect.
>
Yes, I already know that. That's why I think is strange this code
works, because I import pygame with "import pygame" and I can use
Rect() function instead of pygame.Rect() and it works!
> Don't know if that's any clearer :)
>
Sorry, maybe I didn't explained my doubt well... I find some
difficulties explaining things not in my mother tongue ;)
Thanks a lot
> --Mike
>
Gonzalo :)