Lichen

Change of encoders.py

107:3fe37462e0f6
encoders.py
     1.1 --- a/encoders.py	Mon Oct 17 15:39:07 2016 +0200
     1.2 +++ b/encoders.py	Mon Oct 17 18:56:34 2016 +0200
     1.3 @@ -41,8 +41,8 @@
     1.4  
     1.5      all_attrnames = []
     1.6      for t in usage:
     1.7 -        attrname, invocation = t
     1.8 -        all_attrnames.append("%s%s" % (attrname, invocation and "!" or ""))
     1.9 +        attrname, invocation, assignment = t
    1.10 +        all_attrnames.append("%s%s" % (attrname, invocation and "!" or assignment and "=" or ""))
    1.11      return ", ".join(all_attrnames) or "{}"
    1.12  
    1.13  def decode_usage(s):
    1.14 @@ -51,7 +51,7 @@
    1.15  
    1.16      all_attrnames = set()
    1.17      for attrname_str in s.split(", "):
    1.18 -        all_attrnames.add((attrname_str.rstrip("!"), attrname_str.endswith("!")))
    1.19 +        all_attrnames.add((attrname_str.rstrip("!="), attrname_str.endswith("!"), attrname_str.endswith("=")))
    1.20  
    1.21      all_attrnames = list(all_attrnames)
    1.22      all_attrnames.sort()