Loading

Paste #pnnxdykq8

  1.     # new new new
  2.         years = sorted(set((variant.intro_date, variant.end_date) for variant in self.model_variants))
  3.  
  4.     # new new
  5.         years = set()
  6.         for variant in self.model_variants:
  7.             years.add((variant.intro_date, variant.end_date))
  8.         years = sorted(years)
  9.  
  10.     #new
  11.         years = set()
  12.         for dates in [(variant.intro_date, variant.end_date) for variant in self.model_variants]:
  13.             years = years.union(dates)
  14.         years = sorted(years)
  15.  
  16.         # old
  17.         years = sorted(reduce(set.union, [(variant.intro_date, variant.end_date) for variant in self.model_variants], set()))

Version history

Revision # Author Created at
p0bkppph9 Anonymous 15 Feb 2015, 13:44:57 UTC Diff
pswphv1ib Anonymous 15 Feb 2015, 13:37:21 UTC Diff

Comments