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

Mailing List Archive: Python: Bugs

[issue15588] quopri: encodestring and decodestring handle bytes, not strings

 

 

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


report at bugs

Aug 8, 2012, 12:30 AM

Post #1 of 3 (100 views)
Permalink
[issue15588] quopri: encodestring and decodestring handle bytes, not strings

New submission from patrick vrijlandt:

quopri.py's functions encodestring and decodestring are documented to handle strings; and this is clearly suggested by their name. However, these functions accept and return bytes, not strings. This should be reflected in the documentation.

Even better: deprecate these functions and introduce new ones with behaviour as suggested by their names: encode_string, encode_bytes etc.

----------
assignee: docs [at] pytho
components: Documentation, Library (Lib)
messages: 167672
nosy: docs [at] pytho, patrick.vrijlandt
priority: normal
severity: normal
status: open
title: quopri: encodestring and decodestring handle bytes, not strings
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15588>
_______________________________________
_______________________________________________
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

Aug 8, 2012, 10:39 AM

Post #2 of 3 (91 views)
Permalink
[issue15588] quopri: encodestring and decodestring handle bytes, not strings [In reply to]

Changes by R. David Murray <rdmurray [at] bitdance>:


----------
components: +email
nosy: +barry, r.david.murray
versions: +Python 3.3, Python 3.4

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15588>
_______________________________________
_______________________________________________
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

Aug 18, 2012, 3:25 AM

Post #3 of 3 (85 views)
Permalink
[issue15588] quopri: encodestring and decodestring handle bytes, not strings [In reply to]

Petri Lehtinen added the comment:

The encode() and decode() functions also expect binary file objects.

Attached a patch that changes documentation and docstrings. Removed the mentions of readline(), because read() is called on input instead, if the binascii module is available. Also removed the repeated descriptions of quotetabs and header in encodestring()'s docs.

----------
keywords: +needs review, patch
nosy: +petri.lehtinen
stage: -> patch review
Added file: http://bugs.python.org/file26886/issue15588.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15588>
_______________________________________
_______________________________________________
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 Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.