MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / genPrefixes

Method genPrefixes

suds/sax/element.py:1050–1062  ·  view source on GitHub ↗

Generate a I{reverse} mapping of unique prefixes for all namespaces. @return: A referse dict of prefixes. @rtype: {u, p}

(self)

Source from the content-addressed store, hash-verified

1048 return s
1049
1050 def genPrefixes(self):
1051 """
1052 Generate a I{reverse} mapping of unique prefixes for all namespaces.
1053 @return: A referse dict of prefixes.
1054 @rtype: {u, p}
1055 """
1056 prefixes = {}
1057 n = 0
1058 for u in self.namespaces:
1059 p = 'ns%d' % n
1060 prefixes[u] = p
1061 n += 1
1062 return prefixes
1063
1064 def refit(self):
1065 """

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected