Modernize function and method attribute names

Python 3 uses double-underscored names for internal function attributes.
In Python 2.7, these names exist as aliases to the old 'func_*' and
'im_*' names.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Petr Viktorin
2015-07-30 17:03:06 +02:00
committed by Tomas Babej
parent 27dabb4528
commit 8b88caa110
6 changed files with 9 additions and 9 deletions

View File

@@ -203,7 +203,7 @@ class DefaultFrom(ReadOnly):
)
self.callback = callback
if len(keys) == 0:
fc = callback.func_code
fc = callback.__code__
if fc.co_flags & 0x0c:
raise ValueError("callback: variable-length argument list not allowed")
self.keys = fc.co_varnames[:fc.co_argcount]