Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue3239] curses/textpad.py incorrectly and redundantly imports ascii

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jun 29, 2008, 2:28 PM

Post #1 of 7 (153 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii

New submission from Georgij Kondratjev <smpuj[at]bk.ru>:

Line 'import curses, ascii' should be replaced with 'import curses'

----------
components: Library (Lib)
messages: 68969
nosy: orivej
severity: normal
status: open
title: curses/textpad.py incorrectly and redundantly imports ascii
versions: Python 3.0

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 29, 2008, 6:08 PM

Post #2 of 7 (152 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii [In reply to]

Facundo Batista <facundo[at]taniquetil.com.ar> added the comment:

The ascii module is used all around the file... if you don't import it,
how would you use that functionality?

----------
nosy: +facundobatista
resolution: -> invalid
status: open -> closed

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 29, 2008, 11:54 PM

Post #3 of 7 (147 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii [In reply to]

Georgij Kondratjev <smpuj[at]bk.ru> added the comment:

Sorry, I didn't not distinguish between curses module ascii and built-in
function ascii.

"import curses.ascii as ascii" works. Is this a good fix?

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 29, 2008, 11:55 PM

Post #4 of 7 (147 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii [In reply to]

Georgij Kondratjev <smpuj[at]bk.ru> added the comment:

Or is it possible/better to use relative import?

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 30, 2008, 5:06 AM

Post #5 of 7 (139 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii [In reply to]

Facundo Batista <facundo[at]taniquetil.com.ar> added the comment:

Ah, I now understand what you mean.

The best, IMO, to avoid the confusion in the import and in the usage, is
to do:

>>> import curses.ascii as curses_ascii

Do you care to send a patch? Thank you!

----------
assignee: -> facundobatista
resolution: invalid ->
status: closed -> open

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 1, 2008, 10:47 AM

Post #6 of 7 (126 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii [In reply to]

Georgij Kondratjev <smpuj[at]bk.ru> added the comment:

>>> import curses.ascii as curses_ascii

If you like curses_ascii you would probably like curses.ascii :) so here
is the patch. I tested it with module built-in testing facility (if
__name__ == '__main__') but didn't run other tests.

Patch with "patch -i curses-textpad-ascii.patch
src/python/Lib/curses/textpad.py"

----------
keywords: +patch
Added file: http://bugs.python.org/file10790/curses-textpad-ascii.patch

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 5, 2008, 1:40 PM

Post #7 of 7 (118 views)
Permalink
[issue3239] curses/textpad.py incorrectly and redundantly imports ascii [In reply to]

Facundo Batista <facundo[at]taniquetil.com.ar> added the comment:

Commited in r64746. Thank you!!

----------
resolution: -> accepted
status: open -> closed

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue3239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.