[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] taming the circus of modules



On Sat, 5 Jan 2002, Richard Jones wrote:

>On Sat, 5 Jan 2002 19:06, Jan Ekholm wrote:
>> On Fri, 4 Jan 2002, Pete Shinners wrote:
>> >also as an optional idea, i may include the "pygame" variable inside the
>> >little "locals" module. then everything could be imported exactly the
>> >same by doing "from pygame.locals import *", and nothing extra needed.
>> >(to clarify, you would still access everything as "pygame.display", not
>> >just "display"). comments?
>>
>> I'd consider having to write:
>>
>>         from pygame.locals import *
>>
>> much harder than:
>>
>>         import pygame
>>         import pygame.display
>>         import pygame.xxx
>>
>> as it describes more exactly what you import. New users would have a hard
>> time figuring out what the ".locals" part really does, and they would
>> wonder why can't it be just:
>>
>>         from pygame import *
>>
>> instead? Especially if stuff imported using the first approach anyway has
>> the "pygame." prefix it becomes hard to understand.
>
>Ah yes, but then there's teaching users bad habits in the first place with 
>all this from pygame import * stuff ;)

Yes, of course... I kind of like the current way, mostly as I know how it
works.

-- 
 The Emperor had all the qualifications for a corpse except, as it were, the
         most vital one.
                                       -- Terry Pratchett, Interesting Times

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org