Re: Question about modules documentation

2017-09-15 Thread Tobiah
>> 'next sentence' is the operative piece. I think that if the bit >> about placement was moved to the end of the paragraph the whole >> thing would be more readable and I wouldn't have stumbled on it. > > If it had meant "the imported module's names" or indeed "the imported > modules' names", I

Re: Question about modules documentation

2017-09-15 Thread Rhodri James
On 15/09/17 18:05, Tobiah wrote: On 09/15/2017 09:25 AM, Stefan Ram wrote:> Tobiah writes: Modules can import other modules. It is customary but not required to place all import statements at the beginning of a module (or script, for that matter). The imported mo

Re: Question about modules documentation

2017-09-15 Thread Tobiah
On 09/15/2017 09:25 AM, Stefan Ram wrote:> Tobiah writes: >> Modules can import other modules. It is customary but not >> required to place all import statements at the beginning >> of a module (or script, for that matter). The imported >> module names are placed > .. >> When i

Re: Question about modules documentation

2017-09-15 Thread Tobiah
Re-reading I guess the plural refers to the multiple modules referenced in the first sentence. It was probably written that way before someone inserted the bit about the customary placement, which greatly clouds the connection. On 09/15/2017 09:03 AM, Tobiah wrote: > In this doc: > > ht

Re: Question about modules documentation

2017-09-15 Thread Chris Angelico
On Sat, Sep 16, 2017 at 2:03 AM, Tobiah wrote: > It seems that if the statement read: > > the imported module's name (singular) is placed in the > importing module's global symbol table. > > That it would be more accurate. That implies that you only import one module. Consider: i

Re: question about modules

2004-12-10 Thread Reinhold Birkenfeld
Jon wrote: > Hi Jeff, > > That makes sense -- thanks. However now when I use "re.capwords (sentence)" > I get a different error message: > > AttributeError: 'module' object has no attribute 'capwords' > > Each of the other two suggested implimentations produce a similar error > message. Is the

Re: question about modules

2004-12-10 Thread Jon
Hi Jeff, That makes sense -- thanks. However now when I use "re.capwords (sentence)" I get a different error message: AttributeError: 'module' object has no attribute 'capwords' Each of the other two suggested implimentations produce a similar error message. Is there something even more basic

Re: question about modules

2004-12-10 Thread Jeffrey Maitland
Jon writes: Hi, The following four lines of code: import sys, os, re sentence = raw_input("Enter a sentence: ") capwords (sentence) print sentence gives me the following error: NameError: name 'capwords' is not defined As far as I can tell from the online docs, "capwords" should be defi