On 26/09/17 17:56, Stefan Ram wrote: > What happened? I woke up today in parens mood. So I typed: > > import( operator ) > > Python told me that I should type: > > import operator
This is an interesting case: >>> import (os, sys) File "<stdin>", line 1 import (os, sys) ^ SyntaxError: invalid syntax >>> from os import (listdir, chdir) >>> listdir, chdir (<built-in function listdir>, <built-in function chdir>) >>> Of course the reasons the second syntax was eventually added to the language don't apply in the first case, but this does look a bit inconsistent... -- Thomas -- https://mail.python.org/mailman/listinfo/python-list