encoders.py | raw changeset files shortlog |
1.1 --- a/encoders.py Mon Dec 05 16:03:06 2016 +0100 1.2 +++ b/encoders.py Mon Dec 05 17:18:34 2016 +0100 1.3 @@ -389,6 +389,18 @@ 1.4 1.5 return "#%s" % path 1.6 1.7 +def decode_type_attribute(s): 1.8 + 1.9 + "Decode the special type attribute 's'." 1.10 + 1.11 + return s[1:] 1.12 + 1.13 +def is_type_attribute(s): 1.14 + 1.15 + "Return whether 's' is a type attribute name." 1.16 + 1.17 + return s.startswith("#") 1.18 + 1.19 1.20 1.21 # A mapping from kinds to structure size reference prefixes.