Favorite non-python language trick?
jstroud at mbi.ucla.edu
Sat Jun 25 00:47:45 CEST 2005
On Friday 24 June 2005 05:58 am, Steven D'Aprano wrote:
> with colour do begin
> red := 0; blue := 255; green := 0;
> instead of:
> colour.red := 0; colour.blue := 255; colour.green := 0;
> Okay, so maybe it is more of a feature than a trick, but I miss it and it
> would be nice to have in Python.
class color: # americanized
red = 0
blue = 255
green = 0
Less typing than pascal. Also avoids those stupid little colons.
UCLA-DOE Institute for Genomics and Proteomics
Los Angeles, CA 90095
More information about the Python-list