Augmented Assignment question
John Machin
sjmachin at lexicon.net
Fri Jul 18 20:52:39 EDT 2003
More information about the Python-list mailing list
Fri Jul 18 20:52:39 EDT 2003
- Previous message (by thread): Augmented Assignment question
- Next message (by thread): Augmented Assignment question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Doug Tolton <dtolton at yahoo.com> wrote in message news:<215bhv0bnkn13eivh0s64ic5ml8obpgfg7 at 4ax.com>... > I have a function that returns a tuple: > > def checkdoc(self, document): > blen = document['length'] > bates = document['obates'] > > normal, truncated, semicolon = 0,0,0 > for bat in bates: > if len(bat) == 2 * blen: > semicolon += 1 > if len(bat) == blen - 1: > truncated += 1 > if len(bat) == blen: > normal += 1 self.total_normal += normal # etc etc # someone else suggested a separate class just for statistics # --- this is overkill IMHO > > return normal, truncated, semicolon >
- Previous message (by thread): Augmented Assignment question
- Next message (by thread): Augmented Assignment question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list