Skip to content

Determine argspec of static methods with defaults in Cython files #16309

@simon-king-jena

Description

@simon-king-jena

Fix this:

sage: cython("""
....: class Bla:
....:     @staticmethod
....:     def join(categories, bint as_list = False, tuple ignore_axioms=(), tuple axioms=()):
....:         pass
....: """)
sage: from sage.misc.sageinspect import sage_getargspec
sage: sage_getargspec(Bla.join)
  File "<string>", line unknown
SyntaxError: Unexpected EOF while parsing argument list

This does not happen if join is a bound or unbound (not static) method.

Since this will affect building the docs (see #16296), I'd say the component is "documentation".

CC: @nthiery

Component: documentation

Keywords: staticmethod cython argspec

Author: Simon King

Branch/Commit: 143b567

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/16309

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions