[Twisted-Python] Python 2.1

Moshe Zadka m at moshez.org
Fri Aug 23 08:35:50 EDT 2002

2.1 has no nested scopes.
Please don't do that:
    def listGroupRequest(self, group):
        sql = """
            SELECT postings.article_index FROM postings,groups
            WHERE postings.group_id = groups.group_id
            AND groups.name = '%s'
        """ % (adbapi.safe(group),)

        return self.runQuery(sql).addCallback(
            lambda results: (group, [res[0] for res in results])

More information about the Twisted-Python mailing list