This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author peter.otten
Recipients docs@python, peter.otten
Date 2014-03-02.08:46:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The documentation for 

copyreg.pickle(type, function, constructor=None)

has the sentence

"TypeError will be raised if *object* is a class or *constructor* is not callable."

It's not clear to me what "object" refers to. I believe it refers to the first arg (called ob_type in 2.x) and classic classes which were handled with

def pickle(ob_type, pickle_function, constructor_ob=None):
    if type(ob_type) is _ClassType:
        raise TypeError("copy_reg is not intended for use with classes")

in 2.x If I'm right the above sentence should become.

"A TypeError will be raised if *constructor* is not callable."

in 3.x. If I'm wrong please think of way to express the intended meaning more clearly.

Another minor change: class C need not inherit from object explicitly in  3.x.
Date User Action Args
2014-03-02 08:46:06peter.ottensetrecipients: + peter.otten, docs@python
2014-03-02 08:46:06peter.ottensetmessageid: <>
2014-03-02 08:46:05peter.ottenlinkissue20823 messages
2014-03-02 08:46:05peter.ottencreate