1.1 --- a/encoders.py Thu Mar 30 18:48:36 2017 +0200
1.2 +++ b/encoders.py Thu Mar 30 19:41:24 2017 +0200
1.3 @@ -76,27 +76,27 @@
1.4
1.5 "Encode the access location 't'."
1.6
1.7 - path, name, attrname, version = t
1.8 - return "%s:%s:%s:%d" % (path, name or "{}", attrname or "{}", version)
1.9 + return "%s:%s:%s:%d" % (t.path, t.name or "{}", t.attrnames or "{}", t.access_number)
1.10
1.11 def encode_alias_location(t, invocation=False):
1.12
1.13 "Encode the alias location 't'."
1.14
1.15 - path, name, attrname, version = t
1.16 - return "%s:%s:%s:%d%s" % (path, name or "{}", attrname or "{}", version, invocation and "!" or "")
1.17 + return "%s:%s:%s%s%s%s" % (t.path, t.name or "{}", t.attrnames or "{}",
1.18 + t.version is not None and ":=%d" % t.version or "",
1.19 + t.access_number is not None and ":#%d" % t.access_number or "",
1.20 + invocation and "!" or "")
1.21
1.22 def encode_location(t):
1.23
1.24 "Encode the general location 't' in a concise form."
1.25
1.26 - path, name, attrname, version = t
1.27 - if name is not None and version is not None:
1.28 - return "%s:%s:%d" % (path, name, version)
1.29 - elif name is not None:
1.30 - return "%s:%s" % (path, name)
1.31 + if t.name is not None and t.version is not None:
1.32 + return "%s:%s:%d" % (t.path, t.name, t.version)
1.33 + elif t.name is not None:
1.34 + return "%s:%s" % (t.path, t.name)
1.35 else:
1.36 - return "%s::%s" % (path, attrname)
1.37 + return "%s::%s" % (t.path, t.attrnames)
1.38
1.39 def encode_modifiers(modifiers):
1.40