Is it pythonic for a function to return multiple values?

Absolutely (for the example you provided). Tuples are first class citizens in Python There is a builtin function divmod() that does exactly that. q, r = divmod(x, y) # ((x – x%y)/y, x%y) Invariant: div*y + mod == x There are other examples: zip, enumerate, dict.items. for i, e in enumerate([1, 3, 3]): print “index=%d, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)