This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Namespace error with UserList
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: cfly, loewis
Priority: normal Keywords:

Created on 2002-03-05 20:30 by cfly, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg9524 - (view) Author: Charlie Fly (cfly) Date: 2002-03-05 20:30
I may be misunderstanding something about the merging 
of type/class and this may not be a bug.  But here 
goes.

import UserList

class A( UserList ):
   def __init__( self ):
      UserList.UserList.__init__( self )

a = A()

results in

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: 'module' object is not callable

It appears that the name UserList being both module 
and class name is getting confused in the module 
namespace.
msg9525 - (view) Author: Charlie Fly (cfly) Date: 2002-03-05 21:01
Logged In: YES 
user_id=149625

This is not a bug.  I just inherited from a module.  Opps.  
I don't know how to withdraw this thing.

cfly
msg9526 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-03-06 22:04
Logged In: YES 
user_id=21627

Closed on request of submitter.
History
Date User Action Args
2022-04-10 16:05:04adminsetgithub: 36206
2002-03-05 20:30:20cflycreate