On Sat, Oct 25, 2014 at 4:40 PM, Rustom Mody <rustompm...@gmail.com> wrote: > Its generally accepted that side-effecting functions are not a good idea > -- typically a function that returns something and changes global state.
Only in certain circles. Not in Python. There are large numbers of functions with side effects (mutator methods like list.append, anything that needs lots of state like random.random, everything with external effect like I/O, heaps of stuff), and it is most definitely not frowned upon. In Python 3 (or Python 2 with the future directive), print is a function, print() an expression. It's not "semantically a statement". ChrisA -- https://mail.python.org/mailman/listinfo/python-list