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

E743 ambiguous function definition #210

Closed
GiacomoPope opened this issue Sep 2, 2024 · 3 comments · Fixed by #212
Closed

E743 ambiguous function definition #210

GiacomoPope opened this issue Sep 2, 2024 · 3 comments · Fixed by #212

Comments

@GiacomoPope
Copy link
Contributor

    def l(self, s):
        """
        Evaluates the Dirichlet L-function of this character at the given
        complex number s.

            >>> from flint import showgood
            >>> chi = dirichlet_char(1, 1)
            >>> showgood(lambda: chi.l(2), dps=25)
            1.644934066848226436472415
            >>> chi = dirichlet_char(7, 3)
            >>> showgood(lambda: chi.l(2+3j), dps=25)
            1.273313649440490751755284 - 0.07432329442559421607102118j

        """
        s = any_as_acb(s)
        cdef acb v
        v = acb.__new__(acb)
        acb_dirichlet_l((<acb>v).val, (<acb>s).val, self.G.val, self.val, getprec())
        return v

We currently have this function, which triggers the listing error E741 ambiguous variable name 'l'. I think we could probably call this dirichlet_l to match Flint, or l_function? I'm not sure what other people think so I've made this issue to discuss.

@oscarbenjamin
Copy link
Collaborator

Does cython-lint have a way to mark it as ignored like # lint: ignore?

Having a different name does not seem unreasonable if we don't like the current name. The old name should probably still be kept as an alias though since there is no strong reason to break compatibility.

@GiacomoPope
Copy link
Contributor Author

yeah i think we can add a comment to ignore the warning, but if we allow l() here, should we just allow it wherever and maintain the ignore in the list?

I have no feelings about the current name really. I probably wouldnt call it l(s) but it's also probably fine.

@oscarbenjamin
Copy link
Collaborator

should we just allow it wherever and maintain the ignore in the list?

Yeah, I guess so.

What we should do though is add some comments to the ignore list to explain what is being ignored and why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants