Aggregate pattern: Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m WP:CHECKWIKI error 61 fixes + general fixes, References after punctuation per WP:REFPUNC and WP:PAIC using AWB (7671)
Chmarkine (talk | contribs)
m Computer programming: change to https if the server sends HSTS header, replaced: http://www.python.org → https://www.python.org using AWB
Line 43:
return float(sum(g))/len(g) #in Python 3.0 the cast to float will no longer be necessary
</source>
Python hides essentially all of the details using the [httphttps://www.python.org/doc/lib/typeiter.html iterator protocol]. Confusingly, [[Design Patterns]] uses "aggregate" to refer to the blank in the code <code>for x in ___:</code> which is unrelated to the term "aggregation".<ref>[[Design Patterns]], p. 22: "Aggregation implies that one object owns or is responsible for another object. ... Aggregation implies that an aggregate object and its owner have identical lifetimes."</ref> Neither of these terms refer to the statistical aggregation of data such as the act of adding up the Fibonacci sequence or taking the average of a list of numbers.
 
== See also ==