Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)
Rustom Mody
rustompmody at gmail.com
Tue Apr 8 06:53:58 EDT 2014
On Tuesday, April 8, 2014 7:03:31 AM UTC+5:30, Mark H. Harris wrote:
> I have another question for y'all, is a function (particularly a
> generator) a noun or a verb? Does a function (or generator) 'do'
> something (based on name and parms) or does it 'return' something based
> on name and parms? Based on name and parms should a function (or
> generator) function as a noun, or function as a verb, or *both*? --or,
> are Classes nouns only, and all functions *are* verbs only?
If your question is "What is (function/generator...)?"
the answer is noun
If your question is "What does it (function/generator...) do/behave?"
the answer is verb
More information about the Python-list
mailing list