Why is a generator expression called a expression?

Veek M veek at dont-use-this.com
Mon Apr 20 05:32:23 EDT 2020


Also you will note, one can do:
( 2 if 3 > 2 else 4 ) + 4
so the () is just for precedence but otherwise a Conditional Expression 
works as expected by returning a value to be added to + 4.


More information about the Python-list mailing list