Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename l_function method name #212

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build-backend = "mesonpy"

[tool.cython-lint]
max-line-length = 120
ignore = ['E128','E129','E202','E221','E222','E261','E262','E265','E501','E731','E741','E743']
ignore = ['E128','E129','E202','E221','E222','E261','E262','E265','E501','E731','E741']
exclude = 'src/flint/flintlib/.*'

[tool.spin]
Expand Down
5 changes: 4 additions & 1 deletion src/flint/types/dirichlet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ cdef class dirichlet_char(object):
else:
return fmpz(v)

def l(self, s):
def l_function(self, s):
"""
Evaluates the Dirichlet L-function of this character at the given
complex number s.
Expand All @@ -189,6 +189,9 @@ cdef class dirichlet_char(object):
acb_dirichlet_l((<acb>v).val, (<acb>s).val, self.G.val, self.val, getprec())
return v

# For backwards compatibility we allow self.l(s) see Issue #210
l = l_function # no-cython-lint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't any point in doing this unless the docstring is updated to suggest calling the new function name.

I would do it like:

def l_function(self, s):
    """
    >>> l_function()
    123
    """
    ...


def l(self, s):
    """
    Alias for :meth:`l_function`
    """
    return self.l_function(s)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry, i just missed this


def hardy_z(self, s):
"""
Evaluates the Hardy Z-function of this character at the given
Expand Down
Loading