News for hackers. Stuff that matters.
Re:Show HN: Array – A Better Python List by syrrim on Sunday January 10, 2021 @11:23AM (#25716223)

  for x, y in zip(a,b):
      area = to_area(x, y)
      if area > 10:
          print(f"Area {area}")
>in python where you don't often use a namespace to store these intermediary variables

Hm? Most python code is within a function, in my experience.

Re:Show HN: Array – A Better Python List by bko on Sunday January 10, 2021 @11:47AM (#25716510)
You can abstract it out to a function but I think its overkill, even if you generalize to something like print_area_filter(heights, widths, value, cmp) or whatever

If its not in a function, your example may (or may not depending on length if either a or b have a length of zero) create a floating variable called area out there.