Chris Angelico wrote:
So how do you handle something that, by its nature, has BOTH side
effects and a return value?

A Pascal purist would probably say that you should make
it a procedure, and use var parameters to pass back
any results.

In the case of something like the unix write() call, this
may actually make more sense anyway, because in Pascal
you can't just ignore the return value of a function
if you don't want it. Passing a result parameter that
you don't use is probably less obtrusive to read than
assigning to a variable that you don't use.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to