title: Python - Initialize a list of named tuples and pass it to a function
body: <p>I asked my first question yesterday, and hope that I've learned how to better present my issue today. The code below is a simple example that contains the issues of interest to me. It has a couple of flaws that I want to ask about.</p>
  
  <pre><code>from collections import namedtuple
  
  Name = 'Square'
  Point = namedtuple('Point', 'x y')
  
  PointBegin = (0, 0)
  PointList = (
                   (1, 0)
                   (1, 1)
                   (0, 1)
                   (0, 0)
               )
  
  def move_to(pt)
      print('Begin at (', pt.x, ',', pt.y, ')')
  
  def draw_to(pt)
      print('Draw to (', pt.x, ',', pt.y, ')')
  
  def draw(name, bgn_pt *pt_list) :
      print 'Drawing object ', name
      move_to(bgn_pt)
      for pt in pt_list:
          draw_to(pt.x, pt.y)
  
  #Call the draw function, passing the list of named tuples.
  draw(Name, PointBegin, *PointList)
  </code></pre>
  
  <p>First, PointList is not correctly initialized as there's no way for it to know that each sub-list is a Point. Is there any way to initialize this with minimal verbosity? I need to generate this from external data.</p>
  
  <p>Second, the syntax for passing PointList to the draw function is incorrect. Can anyone suggest the correct syntax?</p>
  
  <p>In my question yesterday, I suggested a class, rather than a named tuple. What type of value is best for this?</p>
  
  <p>I'm not too concerned about any other syntax or convention errors. I can figure them out. BTW, I'm using Iron Python with real-time function extensions. But I don't expect that to be relevant to my questions.</p>