Skip to content

Does the Standard Mandate Position-Only and Keyword-Only Arguments? #13

Answered by rgommers
djl11 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @djl11, thanks for the question.

I'm curious, will you treat frameworks which remove all *,\ from the function signatures as still adhering to the standard?

Good question. All implementations may, and are likely to, offer additional functionality beyond what's in the standard. That does not break compliance with the standard. However, if the users is using those extensions then of course their code may no longer be portable.

To give an example, staying with ceil:

  • standard gives the signature ceil(x: array, /). User can therefore write, for an input x, only one form: ceil(x).
  • If Ivy removes / then a user can write two forms: ceil(x) and ceil(x=x). The latter is both not guaranteed to…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@honno
Comment options

@djl11
Comment options

Answer selected by djl11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants