Using tuples correctly?

Leif K-Brooks eurleif at
Mon Oct 11 15:53:18 CEST 2004

BJörn Lindqvist wrote:
> Because you have to declare classes before you can instantiate them.
> If you wanted a RGB tuple, would you really create a class for it? If
> you wanted a 2d point? I guess tuples aren't really needed in python,
> you can always get by by creating objects when you would have used
> types. However, creating a class when all you want is a C-like struct
> leads to alot of tedious and unnecessary work.

My C is a little (a lot) rusty, but don't structures have to be declared 
in pretty much the same way as Python classes? What's the difference?

More information about the Python-list mailing list