Author steve21
Recipients steve21
Date 2009-08-24.07:33:52
SpamBayes Score 5.1994e-11
Marked as misclassified No
Message-id <>
The documentation and implementation disagree.

"Module curses.wrapper
    Convenience function to ensure proper terminal setup and resetting
on application entry and exit.

15.10. curses.wrapper — Terminal handler for curses programs

This module supplies one function, wrapper() ...

curses.wrapper.wrapper(func, ...)
    Wrapper function that initializes curses ..

$ python3.1
Python 3.1.1 (r311:74480, Aug 24 2009, 14:50:57)
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses.wrapper as cw
>>> cw.wrapper
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'function' object has no attribute 'wrapper'

The 'curses.wrapper.wrapper' function no longer exists.
The 'curses.wrapper' module no longer exists, the module is now a function.

The problem is the line
  from curses.wrapper import wrapper
in curses/ - curses has clobbered its own namespace and made
the curses.wrapper module inaccessible.

Instead of this tortuous sequence of module hiding and namespace
clobbering it would be simpler to just place the curses.wrapper.wrapper
function in curses/ and do away with the need for the
curses.wrapper single-function-module.
And update the docs so:
  references to the curses.wrapper module are removed
  the function curses.wrapper.wrapper(func, ...) becomes
               curses.wrapper.(func, ...)
Date User Action Args
2009-08-24 07:33:56steve21setrecipients: + steve21
2009-08-24 07:33:56steve21setmessageid: <>
2009-08-24 07:33:54steve21linkissue6771 messages
2009-08-24 07:33:52steve21create