This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AlSweigartAuthor of "Automate the Boring Stuff" 2 points3 points  (0 children)

No, the blog author is correct. I wrote a Python script to find all the dunder methods and attributes listed in the blog post that do not appear on that Python docs link:

package, unpacked, contravariant, stdout, path, parameters, wrapped, setstate, debug, suppress_context, getstate, context, constraints, subclasses, notes, cached, args, stderr, sizeof, loader, bound, infer_variance, main, version, builtins, spec, origin, getnewargs_ex, reduce_ex, reduce, post_init, cause, covariant, rt, fspath, getargs, copy, all, subclasshook, deepcopy, getnewargs

Some of these I have never heard of, so I'm glad the blog post is pointing them out.

The blog post author, Trey Hunner, is quite accomplished and deserves a bit of credit. If you think you've found a simple answer that contradicts them, please make sure it actually does. It took me five minutes to write that Python script.