[issue22392] Clarify documentation of __getinitargs__

2017-03-30 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2017-03-30 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 2ee01ecf419a392f0b6a33ca10d1f747adb6c43a by Mariatta (Mandeep 
Singh) in branch '2.7':
[2.7] bpo-22392: Improve documentation for __getinitargs__  (GH-899)
https://github.com/python/cpython/commit/2ee01ecf419a392f0b6a33ca10d1f747adb6c43a


--

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2017-03-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +alexandre.vassalotti

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2017-03-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See more detailed description in PEP 307.

--
nosy: +serhiy.storchaka
stage: needs patch -> patch review

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2017-03-29 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +801

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2017-03-29 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +800

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2016-09-28 Thread Berker Peksag

Berker Peksag added the comment:

https://docs.python.org/2/library/pickle.html#object.__getinitargs__ states:

"If it is desirable that the __init__() method be called on unpickling, an 
old-style class can define a method __getinitargs__(), which should return a 
tuple containing the arguments to be passed to the class constructor 
(__init__() for example)."

However, there is no mention that it only accepts positional arguments.

This is a Python 2-only change and the documentation file is located at 
Doc/library/pickle.rst in 2.7 branch.

--
keywords: +easy
nosy: +berker.peksag
stage:  -> needs patch

___
Python tracker 

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



[issue22392] Clarify documentation of __getinitargs__

2014-09-11 Thread David Gilman

New submission from David Gilman:

Implementations of __getinitargs__ return a tuple of the positional arguments 
for __init__.   This wasn't initially apparent to me after reading the docs: I 
thought you were passing a tuple (args, kwargs) that would get called f(*args, 
**kwargs) and had to go to the pickle implementation to find out what you were 
supposed to do.

The proposed documentation enhancement: mention that you're just supposed to 
return a tuple of positional args and that it doesn't support kwargs.

--
assignee: docs@python
components: Documentation
messages: 226795
nosy: David.Gilman, docs@python
priority: normal
severity: normal
status: open
title: Clarify documentation of __getinitargs__
type: enhancement
versions: Python 2.7

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