Tuples -- who needs 'em

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Mon Apr 10 18:54:58 EDT 2000


Glenn Andreas wrote in comp.lang.python:
> At the very least, this visually is jarring and you need to mentally 
> "reparse" when you get to the second ">".  Another alternative is to 
> switch to multi-character brackets, perhaps:
> 
>    x = (* a, b *)
> 
> or:
> 
>    x = <| a, b |>
> 
> With two characters, there could be hundreds of possible "bracket" 
> pairs.  Unfortunately, that makes your code look like it has been 
> infested with "smileys".  I seem to remember that some other languages 
> using them though (besides old Pascal style comments, that is).

LPC uses ({ "spam": "eggs" }) for dictionaries (called "mappings" in that
world). I like that. But that gives problems with the current syntax, of
course.


-- 
Remco Gerlich,  scarblac at pino.selwerd.nl
  Murphy's Rules, "Seat belt? What seat belt?":
   In Avalon Hill's Speed Circuit, a car which rear-ends another may spin
   out and crash, but the rammed vehicle is unaffected.



More information about the Python-list mailing list