On 22/05/2017 14:35, Kwankyu Lee wrote:
It seems that some misunderstanding is going on here.
If a method returns an integer and a matrix by "Return n, m". I am saying
that the output block can be simply
OUTPUT:
- integer ...
- matrix ...
instead of
OUTPUT: a tuple of ``(n,m)`` where
- ``n`` is a integer ...
- ``m`` is a matrix ...
You may prefer the second style, but does the first style miss an essential
information?
Yes! A function in Python always return a unique object. This object
might be a tuple or a list with several components. So I would say that
it is mandatory to specify what the actually output is. In the above
case a tuple. Compare
def f(): return 1,2
def g(): return [1,2]
The functions has essentially the same functionalities however these are
different functions.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.