#17447: Clarify and complete documentation of function()
-------------------------+-------------------------------------------------
Reporter: | Owner:
schymans | Status: needs_work
Type: | Milestone: sage-6.5
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: Ralf Stephan
documentation | Work issues:
Keywords: | Commit:
Authors: | 4585e74063e81a8c332a500d016e837069edf8eb
schymans | Stopgaps:
Report Upstream: N/A |
Branch: |
public/17447 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by rws):
Replying to [comment:23 nbruin]:
> I think that's another issue. The problem there is that global namespace
`var` and `function` return a value ''as well as'' insert something into
the namespace. That's counter to python custom (routines that mutate state
normally return `None`. Compare `L.sort()` and `sorted(L)`. There are
exceptions: `L.pop()`).
>
> Initially it seems pedantic to enforce such rules in a computer algebra
system as well, but the many problems it causes suggests it's not. Can we
have `declare_var('x,y')` and `declare_function('f')` for the mutating
stuff and just have `var('x')` and `function('f')` for the normal stuff?
That ship has probably sailed already.
See #17958 for `declare_var` and no, this is still a good idea.
--
Ticket URL: <http://trac.sagemath.org/ticket/17447#comment:25>
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.