Package openid :: Module kvform
[frames] | no frames]

Module kvform

source code

Functions [hide private]
str seqToKV(seq, strict=True)
Represent a sequence of pairs of strings as newline-terminated key:value pairs.
  kvToSeq(data, strict=True)
After one parse, seqToKV and kvToSeq are inverses, with no warnings:
  dictToKV(d)
  kvToDict(s)

Function Details [hide private]

seqToKV(seq, strict=True)

source code 

Represent a sequence of pairs of strings as newline-terminated key:value pairs. The pairs are generated in the order given.
Parameters:
  • seq ([(str, (unicode|str))]) - The pairs
Returns: str
A string representation of the sequence

kvToSeq(data, strict=True)

source code 

After one parse, seqToKV and kvToSeq are inverses, with no warnings:
   seq = kvToSeq(s)
   seqToKV(kvToSeq(seq)) == seq

dictToKV(d)

source code 

kvToDict(s)

source code