summaryrefslogtreecommitdiff
path: root/Lib/idlelib/CallTips.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-02-25 20:55:47 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2007-02-25 20:55:47 +0000
commit221085de89afa861c49ff4306979dbbad949d393 (patch)
tree3e79f6c14311cba733d5f8d1a1e2c227d238fd51 /Lib/idlelib/CallTips.py
parent27d517b21b67b54637acd19785f7adfc38fbd8c2 (diff)
downloadcpython-git-221085de89afa861c49ff4306979dbbad949d393.tar.gz
Change all the function attributes from func_* -> __*__. This gets rid
of func_name, func_dict and func_doc as they already exist as __name__, __dict__ and __doc__.
Diffstat (limited to 'Lib/idlelib/CallTips.py')
-rw-r--r--Lib/idlelib/CallTips.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py
index b395f1542d..9152eaabfd 100644
--- a/Lib/idlelib/CallTips.py
+++ b/Lib/idlelib/CallTips.py
@@ -147,15 +147,15 @@ def get_arg_text(ob):
fob = ob
# Try to build one for Python defined functions
if type(fob) in [types.FunctionType, types.LambdaType]:
- argcount = fob.func_code.co_argcount
- real_args = fob.func_code.co_varnames[arg_offset:argcount]
- defaults = fob.func_defaults or []
+ argcount = fob.__code__.co_argcount
+ real_args = fob.__code__.co_varnames[arg_offset:argcount]
+ defaults = fob.__defaults__ or []
defaults = list(map(lambda name: "=%s" % repr(name), defaults))
defaults = [""] * (len(real_args) - len(defaults)) + defaults
items = map(lambda arg, dflt: arg + dflt, real_args, defaults)
- if fob.func_code.co_flags & 0x4:
+ if fob.__code__.co_flags & 0x4:
items.append("...")
- if fob.func_code.co_flags & 0x8:
+ if fob.__code__.co_flags & 0x8:
items.append("***")
arg_text = ", ".join(items)
arg_text = "(%s)" % re.sub("\.\d+", "<tuple>", arg_text)