Skip to content

[autodoc] please avoid evaluating default function arguments #2844

@mitya57

Description

@mitya57

Currently if Sphinx encounters a function like this:

def age(self, now=datetime.datetime.utcnow()):

It generates output like this:

age(now=datetime.datetime(2016, 8, 5, 7, 33, 8, 845335))

I think it is confusing and should be avoided.
(Originally reported at Debian #833820.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions