#16607: Enforce keyword-only parameters
-------------------------------------+-------------------------------------
       Reporter:  gagern             |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.3
      Component:  misc               |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/gagern/ticket/16607              |  dde4ad657e8d9628c56b8907055956475153e79b
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by gagern):

 * commit:   => dde4ad657e8d9628c56b8907055956475153e79b


Comment:

 OK, here is my implementation. With a big fat warning about performance
 considerations, to reduce the chances of inappropriate use.

 In comment:16:ticket:15515 I had to undo some changes by Jeroen Demeyer to
 avoid breaking compatibility for positional arguments. So it seems I'm not
 the only one who would like to get rid of some positional parameters to
 simplify implementations. With this tool here, we can have a proper
 deprecation period before we can finally dump them.

 And with the `extra` keyword I introduced, things are even simpler for
 those cases. That keyword allows me to specify the names of any excess
 positional parameters, which will then be included in the `**kwds` dict so
 one doesn't have to mention them a second time when passing those
 arguments down the line.
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=dde4ad657e8d9628c56b8907055956475153e79b
 dde4ad6]||{{{Implement @keyword_only decorator.}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/16607#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to