Tuple Semantics - Rationale'?

Roman Suzi rnd at onego.ru
Wed Jul 11 15:46:56 EDT 2001


On 11 Jul 2001, Tim Daneliuk wrote:

>I'm curious about why python was designed to handle the tuple semantics
>described below the way it does.  Perhaps one of you language experts
>can 'splain it to me.

If you are using trailing comma in every non-empty tuple,
then there is no problem with consistency.

For example:

mytuples = (
  (1, 2, 3,),
  (),
  (1,),
)

Usually I use it only when tuples are open for additions.
In things like: (x, y, z) or (R, G, B) I do not expect
that 4th dimensions will appear any time soon ;-)


Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Wednesday, July 11, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "186,000 miles/sec: Not just a good idea, it's the LAW." _/





More information about the Python-list mailing list