Re: f---ing typechecking



James Stroud <jstroud@xxxxxxxxxxxx> writes:

I increasingly come to the decision to avoid tuples altogether
because, eventually, you end up turning them into lists anyway

I don't. I end up extracting them to separate variables.

>>> foo = (12, None, "spam")
>>> # ...
>>> # much code, perhaps passing foo around as parameter
>>> # ...
>>> (bar, baz, wibble) = foo
>>> # code using bar, baz, and/or wibble

If they are eventually extracted to lists, then it generally makes no
sense for them ever to begin as a tuple.

--
\ "I have an answering machine in my car. It says, 'I'm home now. |
`\ But leave a message and I'll call when I'm out.'" -- Steven |
_o__) Wright |
Ben Finney

.



Relevant Pages

  • Re: [ANN][SoC] Ariel 0.1.0 released
    ... This is because of the way it checks for nesting when extracting label tags, ... Can Ariel correctly identify footnotes and pull in the text ... have:verses in your example above. ... lists with more than 5 children). ...
    (comp.lang.ruby)
  • Re: MuPAD: eigenvalue extraction from a list of sub-lists
    ... map, op, 2) for respectively extracting the ... multiplicity and the eigenvalue sub lists generated by the ... I am trying to extract the eigenvalues, ...
    (comp.soft-sys.matlab)
  • Re: Comparing two columns with email addresses
    ... Extracting Values Common To Two Lists ... I am trying to compare two columns that contain email addresses. ...
    (microsoft.public.excel.programming)
  • Re: Duplicate values
    ... See Chip Pearson's duplicate page for a varirty of techniques: ... Extracting Values Common To Two Lists ... Extracting Values On One List And Not Another ... > amount taken to the bank and when. ...
    (microsoft.public.excel.programming)
  • Options listing
    ... Right, I've got two lists of options to remove, based on feedback, and a ... closer examination of the current options. ... And for turning off permanently: ...
    (rec.games.roguelike.angband)