new enum idiom

Fredrik Lundh fredrik at effbot.org
Fri Jan 12 03:17:35 EST 2001


Robert Amesz wrote:
> Hmm I see a problem here: doesn't the %-operator take a tuple on the
> right hand side, or has that changed in 2.0?

no, and no.

    http://www.python.org/doc/current/lib/typesseq-strings.html

    "The right argument should be a tuple with one item
    for each argument required by the format string; if the
    string requires a single argument, the right argument
    may also be a single non-tuple object"

Cheers /F





More information about the Python-list mailing list