Anonymous avatar Anonymous committed 29015b5

Slight update of doc string -- suggest default args for __init__, no
longer complain that __getinitargs__ is an ugly name.

Comments (0)

Files changed (1)

 
 First of all, the class must be defined at the top level in a module.
 
-Next, it must normally be possible to create class instances by calling
-the class without arguments.  If this is undesirable, the class can
-define a method __getinitargs__ (XXX not a pretty name!), which should
-return a *tuple* containing the arguments to be passed to the class
+Next, it must normally be possible to create class instances by
+calling the class without arguments.  Usually, this is best
+accomplished by providing default values for all arguments to its
+__init__ method (if it has one).  If this is undesirable, the
+class can define a method __getinitargs__, which should return a
+*tuple* containing the arguments to be passed to the class
 constructor.
 
 Classes can influence how their instances are pickled -- if the class defines
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.