Inplace shuffle function returns none

Ben Finney ben+python at benfinney.id.au
Wed Oct 19 04:02:04 EDT 2016


Sayth Renshaw <flebber.crue at gmail.com> writes:

> Ok i think i do understand it. I searched the python document for
> in-place functions but couldn't find a specific reference. 

They aren't a separate kind of function.

A function can do anything Python code can do; indeed, most Python
programs do just about everything they do inside functions.

A function also, if it returns, returns a value. (Sometimes that is the
value ‘None’.)

There's no special distinction between functions that return ‘None’
versus those that don't. There's no special distinction between
functions that have other effects versus those that don't.

> Is there a particular part in docs or blog that covers it? Or is it
> fundamental to all so not explicitly treated in one particular page?

I don't really understand the question, but I hope that addresses it.

-- 
 \           “Prayer must never be answered: if it is, it ceases to be |
  `\   prayer and becomes correspondence.” —Oscar Wilde, _The Epigrams |
_o__)                                            of Oscar Wilde_, 1952 |
Ben Finney




More information about the Python-list mailing list