Missing values in tuple assignment

2009-03-19 Thread Jim Garrison
Use case: parsing a simple config file line where lines start with a keyword and have optional arguments. I want to extract the keyword and then pass the rest of the line to a function to process it. An obvious use of split(None,1) cmd,args= = line.split(None,1); if cmd in self.switch:

Re: Missing values in tuple assignment

2009-03-19 Thread Albert Hopkins
On Thu, 2009-03-19 at 11:57 -0500, Jim Garrison wrote: Use case: parsing a simple config file line where lines start with a keyword and have optional arguments. I want to extract the keyword and then pass the rest of the line to a function to process it. An obvious use of split(None,1)

Re: Missing values in tuple assignment

2009-03-19 Thread MRAB
Albert Hopkins wrote: On Thu, 2009-03-19 at 11:57 -0500, Jim Garrison wrote: Use case: parsing a simple config file line where lines start with a keyword and have optional arguments. I want to extract the keyword and then pass the rest of the line to a function to process it. An obvious use of

Re: Missing values in tuple assignment

2009-03-19 Thread Terry Reedy
Jim Garrison wrote: Use case: parsing a simple config file line where lines start with a keyword and have optional arguments. I want to extract the keyword and then pass the rest of the line to a function to process it. An obvious use of split(None,1) cmd,args= = line.split(None,1); if