Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: from a module return a class Date: Fri, 18 Mar 2016 16:16:03 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 22 Message-ID: References: NNTP-Posting-Host: panix2.panix.com X-Trace: reader1.panix.com 1458317763 27479 166.84.1.2 (18 Mar 2016 16:16:03 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Fri, 18 Mar 2016 16:16:03 +0000 (UTC) User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:105225 In Wolfgang Maier writes: > > So promptUser_PWord is a module? Well, I'm confused. You gave us this > > bit of code: > > > > user_pword = promptUser_PWord() > > > > But that can't work if promptUser_PWord is a module; modules aren't > > callable. promptUser_PWord() has to be a function or a class. > > > Yes, but I guess the OP's program will run into the SyntaxError when > trying to import the module, i.e., before it ever encounters the > TypeError: 'module' object is not callable. Good point; I hadn't thought of that. -- John Gordon A is for Amy, who fell down the stairs gordon@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"