[Tutor] Tutor Digest, Vol 111, Issue 24

Jim Mooney cybervigilante at gmail.com
Fri May 10 18:42:30 CEST 2013


> As with any other module you need to specify the module when using its
> contents:
>
> newRandomList = makeRandomList.createRandomList()
>
> BTW. A better name for the module is probably just randomlist
>
> HTH
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/

Ah, me so stupid.  That workede. Although I recall making a very
simple test program that didn't use the module prefix and it worked
for some odd reason.  I just made a dummy prog that said
print('thisworks'), put it in Lib, imported with a test prog, and it
printed out. Which is why I got confused. Oh well, I'll just ignore
that and use the prefix.

BTW, does your "better name" mean that camelCaps are discouraged in
Python? I loathe finding the underline key and figured it was a good
way to always avoid Python reserved words.

Jim


More information about the Tutor mailing list