[issue27079] Bugs in curses.ascii predicates

2016-07-01 Thread Akira Li
Akira Li added the comment: I'm not sure anything should be done (e.g., it is "undefined behavior" to pass a negative value such as CHAR_MIN (if *char* type is signed) to a character classification function in C. Though EOF value (-1 traditionally) should be handled). If you want to explore

[issue27079] Bugs in curses.ascii predicates

2016-06-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since screen.getch() can return -1, it looks reasonable to make curses.ascii predicates to work with negative integers. Do you want to open a new issue and write a patch Akira? -- ___ Python tracker

[issue27079] Bugs in curses.ascii predicates

2016-06-30 Thread Akira Li
Akira Li added the comment: There is an overlapping issue from 2010: "curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)" http://bugs.python.org/issue9770 Your patch fixes it too (it should be closed). Note: the patch does not pass tests from

[issue27079] Bugs in curses.ascii predicates

2016-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed with wrong commit message (damn two clipboards on X11) in ac8338546ca8, d7b6c07bc713, d03c8d0a6a73. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27079] Bugs in curses.ascii predicates

2016-06-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue27079] Bugs in curses.ascii predicates

2016-05-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Most curses.ascii predicates corresponds C functions declared in . But there are some differences: 1. isblank() returns True for space and backspace instead of space and tab. 2. ispunct() returns True for non-ASCII and control characters. 3. iscntrl()