Feeds:
Posts
Comments

Posts Tagged ‘Tuple’

This can be a bit of an obscure error, if you run into it…  It looks like this: File “…/CCRM/Content.py”, line 202, in Page_Update (‘Nav1′ , Data.Nav1), TypeError: ‘tuple’ object is not callable In reality, it’s typically caused by accidentally forgetting a comma from the line before: Notice that line 9 is missing a comma [...]

Read Full Post »

You start your day, happily working with dictionaries…Life is good. All of a sudden, storm clouds appear. Your dictionary variable accidentally gets assigned a list, and life is no longer good! The error message "TypeError: list indices must be integers" is generated when you attempt to use a non-int for a index inside the [] [...]

Read Full Post »

What is a tuple?

I get asked this from time to time, so for the fun of it, I’ll post this: Tuples are immutable lists in python (and other languages).  Very lightweight, unchangable arrays.  They are used for storing multiple values in one variable (usually a fixed number of values). x = (1, 2, 3, ‘abc’) x[0] -> 1 [...]

Read Full Post »

Follow

Get every new post delivered to your Inbox.

Join 28 other followers