New submission from Peter Occil <pocci...@gmail.com>:

It appears that if a method has default parameters set to functions, as in this 
example:

    def f1():
        pass

    def f2(a, b=f1):
        pass

The resulting Pydoc output produces a different, nondeterministic rendering for 
the f2 method each time it generates the documentation, such as `m1(a, 
b=<function f1 at 0x7f4ff67f8950>)` or `m1(a, b=<function f1 at 
0x7f4ff67f8950>)`.  And this is problematic for version control systems, among 
other things, especially since this is not a meaningful change to the 
documentation.

One solution may be to write, say, `m1(a, b=f1)` instead.

----------
assignee: docs@python
components: Documentation
messages: 360278
nosy: Peter Occil, docs@python
priority: normal
severity: normal
status: open
title: Nondeterministic Pydoc output on functions that have functions as 
default parameters
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39391>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to