[issue17827] Document codecs.encode and codecs.decode

2013-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bdb30bdf60a5 by Nick Coghlan in branch '2.7':
Close #17827: Document codecs.encode & codecs.decode
http://hg.python.org/cpython/rev/bdb30bdf60a5

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

Oops, never mind - the tests are already there (and have been since MAL's 
original commit prior to Python 2.4), I just fail at searching code.

--
title: Document and test codecs.encode and codecs.decode -> Document 
codecs.encode and codecs.decode
versions:  -Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-11-04 Thread Nick Coghlan

Nick Coghlan added the comment:

Hmm, I just noticed an interesting issue here in drafting the 2.7 backport: as 
near as I can tell, these aren't tested, so other implementations that failed 
to provide them would pass the 2.7 and 3.3 test suites.

--
Added file: http://bugs.python.org/file32492/issue17827_docs_py27.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-10-13 Thread Nick Coghlan

Nick Coghlan added the comment:

Still need to backport this to 2.7

(Thanks for the preliminary patch Grant, but I'm afraid it didn't make it into 
what I ended up committing)

--
versions:  -Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b607ce6c9ee6 by Nick Coghlan in branch '3.3':
Issue #17827: Document codecs.encode and codecs.decode
http://hg.python.org/cpython/rev/b607ce6c9ee6

New changeset 32f3d6721c84 by Nick Coghlan in branch 'default':
Issue #17827: document codecs.encode and codecs.decode
http://hg.python.org/cpython/rev/32f3d6721c84

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

We should fix the docs for the earlier versions as well.

--
versions: +Python 2.7, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-07-08 Thread Grant

Grant added the comment:

codecs module and 'whats new' doc patch for 3.4

--
keywords: +patch
nosy: +Grant
versions:  -Python 2.7, Python 3.3
Added file: http://bugs.python.org/file30860/17827.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-27 Thread Nick Coghlan

Nick Coghlan added the comment:

This is only the second case I'm aware of where a particularly interesting 
piece of functionality didn't get mentioned in the appropriate What's New doc. 
For the other case, the zipfile execution support, we just added it in to the 
2.6 What's New long after 2.6 had been released. To this day, most people don't 
know about that capability, which is why I suggest it's worth handling the 
current case (codecs.encode and codecs.decode) differently and noting their 
existence in the next What's New doc that people are likely to read :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-26 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

I was not aware that such things are placed in What's New. I just looked at 
such a document for 3.3... makes a lot of sense.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue17827] Document codecs.encode and codecs.decode

2013-04-26 Thread Ezio Melotti

Ezio Melotti added the comment:

To advertise them?  It should be explained that they are not new, but that now 
they are documented and can/should be used.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-26 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

So, why place them in What's New?

--
nosy: +tshepang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-25 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that in 2.7, these docs should have a ":versionadded: 2.4" marker, while 
in 3.3 and 3.4, they shouldn't have a version added marker at all.

These functions should also get an entry in the 3.4 What's New, even though 
they're not actually new.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +ezio.melotti
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17827] Document codecs.encode and codecs.decode

2013-04-24 Thread Nick Coghlan

New submission from Nick Coghlan:

The codecs module has long offered encode() and decode() convenience functions 
(since 2004: http://hg.python.org/cpython-fullhistory/rev/8ea2cb1ec598), but 
they're not documented (except through docstrings). We should fix that.

>From the docstrings:
==
encode(obj, [encoding[,errors]]) -> object

Encodes obj using the codec registered for encoding. encoding defaults
to the default encoding. errors may be given to set a different error
handling scheme. Default is 'strict' meaning that encoding errors raise
a ValueError. Other possible values are 'ignore', 'replace' and
'xmlcharrefreplace' as well as any other name registered with
codecs.register_error that can handle ValueErrors.
==
decode(obj, [encoding[,errors]]) -> object

Decodes obj using the codec registered for encoding. encoding defaults
to the default encoding. errors may be given to set a different error
handling scheme. Default is 'strict' meaning that encoding errors raise
a ValueError. Other possible values are 'ignore' and 'replace'
as well as any other name registered with codecs.register_error that is
able to handle ValueErrors.
==

Note that the difference between the convenience functions in the codecs module 
and the methods on str, bytes and bytearray is that the latter have additional 
type checks to limit their usage to text encodings. str.encode expects a 
str->bytes conversion, while bytes.decode and bytearray.decode both expect the 
codec to produce a str object. codecs.encode and codecs.decode are both 
arbitrary object->object conversions, limited only by whatever the chosen codec 
supports.

--
assignee: docs@python
components: Documentation
messages: 187700
nosy: docs@python, ncoghlan
priority: normal
severity: normal
status: open
title: Document codecs.encode and codecs.decode
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com