On Mon, Aug 10, 2015 at 09:23:15PM +0200, Guido van Rossum wrote: [...] > Anyway, this generalization from print() is why I want arbitrary > expressions. Wouldn't it be silly if we introduced print() today and said > "we don't really like to encourage printing complicated expressions, but > maybe we can introduce them in a future version"... :-)
That's a straw-man argument. Nobody is arguing against allowing arbitrary expressions as arguments to functions. If you want a fair analogy, how about the reluctance to allow arbitrary expressions as decorators? @[spam, eggs, cheese][switch] def function(): ... As far as I can see, the non-straw argument is that f-strings be limited to the same subset of expressions that format() accepts: name and attribute look-ups, and indexing. -- Steve _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com