just habit ...i dont like one liners with ":", also makes it easy to
tack on conditionals...feel free to submit a patch for all those if
theyre really bothering you (i guarantee program speed /mem usage will
not budge in any measurable way).
On Jan 25, 4:30 pm, sdob...@sistechnology.com wrote:
there are several places of such unused lists being made.
i pick a random occurence, in this case InstrumentedAttribute:
def _adapt_list(self, data):
if self.typecallable is not None:
t = self.typecallable()
if data is not None:
[t.append(x) for x in data]
return t
else:
return data
why not just
for x in data: t.append(x)