[Python-Dev] Python Language Reference has no mention of list comÃprehensions
Stephen J. Turnbull
stephen at xemacs.org
Thu Dec 3 12:31:05 EST 2015
More information about the Python-Dev mailing list
Thu Dec 3 12:31:05 EST 2015
- Previous message (by thread): [Python-Dev] Python Language Reference has no mention of list comÃprehensions
- Next message (by thread): [Python-Dev] Python Language Reference has no mention of list comÃprehensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Laura Creighton writes: > Am I missing something important about the 'display' language? A display is a constructor that looks like a literal but isn't. It is syntactically like the printed output, but may contain expressions to be evaluated at runtime as well as compile-time constant expressions that can be "folded". I find it useful to have a single word that means that, and can't think of a better one. I suppose "display" was chosen because the syntax is intended to "look like" the constructed object (ie, its printable representation). A comprehension corresponds to what is often called "set-builder notation" for sets; it doesn't look like the print representation. I'd be perfectly happy to include comprehensions in the concept of display, but Guido says no, and I'm happy to have them be different too. :-) I don't know if you missed any of that, I don't claim that it's terribly important, and Your Mileage May Vary, but it works for me. :-) BTW, I don't care if usage is consistent in this case. I like consistency, but insisting on it here would be an Emersonian hobgoblin IMO (again, YMMV).
- Previous message (by thread): [Python-Dev] Python Language Reference has no mention of list comÃprehensions
- Next message (by thread): [Python-Dev] Python Language Reference has no mention of list comÃprehensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list