[mnet-devel] coding standards question
Zooko
zooko at zooko.com
Fri Feb 14 15:34:00 GMT 2003
What looks better:
(spam, eggs, bacon,) = self.fetch_breakfast()
or
spam, eggs, bacon, = self.fetch_breakfast()
Note: I always put trailing commas on the end of any sort of list,
tuple, dict, etc. This makes it easier to edit (for example, to
rearrange the elements) and it disambiguates the 1-element tuple
'(spam,)', which would otherwise get parsed by the Python interpreter as
just 'spam' (after the parser removes the parenthesis thinking that they
are just for precedence grouping.
Regards,
Zooko
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel
More information about the Mnet-devel
mailing list