[mnet-devel] coding standards question
Zooko
zooko at zooko.com
Sun May 25 11:42:12 BST 2003
> > (spam, eggs, bacon,) = self.fetch_breakfast()
> >
> > or
> >
> > spam, eggs, bacon, = self.fetch_breakfast()
>
> Bottom one.
>
> myers
Ever since we had this exchange (February 2003) I've been trying to remember
to do the bottom one. I was just about to add it to the coding standards doc
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/mnet/mnet_new/doc/coding_standards.html?rev=HEAD&content-type=text/html
(which all Mnet Hackers should print out and hang next to their computer),
when I realized that it is inconsistent with the way we declare new tuples:
mynewtup = ("spam", eggs, 2,)
So I had a new question for all Mnet coders. Which of these three do you
prefer:
(spam, eggs, bacon,) = self.fetch_breakfast()
def fetch_breakfast(self):
return (self.fetch_spam(), self.eggs, "yummy!",)
# or:
spam, eggs, bacon, = self.fetch_breakfast()
def fetch_breakfast(self):
return self.fetch_spam(), self.eggs, "yummy!",
# or:
spam, eggs, bacon, = self.fetch_breakfast()
def fetch_breakfast(self):
return (self.fetch_spam(), self.eggs, "yummy!",)
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
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