Lichen

Changeset

906:97fb61c1a871
2019-06-08 Paul Boddie raw files shortlog changelog graph Fix default parameter names where .name attribute initialisers are used.
inspector.py (file)
     1.1 --- a/inspector.py	Sun Jun 02 23:10:26 2019 +0200
     1.2 +++ b/inspector.py	Sat Jun 08 17:54:53 2019 +0200
     1.3 @@ -3,8 +3,8 @@
     1.4  """
     1.5  Inspect and obtain module structure.
     1.6  
     1.7 -Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013,
     1.8 -              2014, 2015, 2016, 2017, 2018 Paul Boddie <paul@boddie.org.uk>
     1.9 +Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
    1.10 +              2018, 2019 Paul Boddie <paul@boddie.org.uk>
    1.11  
    1.12  This program is free software; you can redistribute it and/or modify it under
    1.13  the terms of the GNU General Public License as published by the Free Software
    1.14 @@ -659,6 +659,9 @@
    1.15                     self.function_defaults[function_name] = []
    1.16  
    1.17          for argname, default in compiler.ast.get_defaults(n):
    1.18 +            if argname[0] == ".":
    1.19 +                argname = argname[1:]
    1.20 +
    1.21              if default:
    1.22  
    1.23                  # Obtain any reference for the default.