# HG changeset patch # User Paul Boddie # Date 1477175833 -7200 # Node ID fe65f4aa1f90eb8a04ff142e0a28621f34873632 # Parent 2b3004a5a83bb26a6512563bf7ccd70a6308dc68 Introduced the special get_using function. diff -r 2b3004a5a83b -r fe65f4aa1f90 lib/__builtins__/__init__.py --- a/lib/__builtins__/__init__.py Sun Oct 23 00:36:32 2016 +0200 +++ b/lib/__builtins__/__init__.py Sun Oct 23 00:37:13 2016 +0200 @@ -3,7 +3,7 @@ """ Simple built-in classes and functions. -Copyright (C) 2015 Paul Boddie +Copyright (C) 2015, 2016 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -19,7 +19,8 @@ this program. If not, see . """ -from __builtins__.core import object, type, function, BaseException, Exception, Warning +from __builtins__.core import function, get_using, object, type, \ + BaseException, Exception, Warning # Exceptions. diff -r 2b3004a5a83b -r fe65f4aa1f90 lib/__builtins__/core.py --- a/lib/__builtins__/core.py Sun Oct 23 00:36:32 2016 +0200 +++ b/lib/__builtins__/core.py Sun Oct 23 00:37:13 2016 +0200 @@ -61,4 +61,6 @@ class Exception(BaseException): pass class Warning(object): pass +def get_using(callable, instance): pass + # vim: tabstop=4 expandtab shiftwidth=4 diff -r 2b3004a5a83b -r fe65f4aa1f90 lib/__builtins__/span.py --- a/lib/__builtins__/span.py Sun Oct 23 00:36:32 2016 +0200 +++ b/lib/__builtins__/span.py Sun Oct 23 00:37:13 2016 +0200 @@ -66,6 +66,6 @@ "Initialise the slice with the given 'start_or_end', 'end' and 'step'." - xrange.__init__(self, start_or_end, end, step) + get_using(xrange.__init__, self)(start_or_end, end, step) # vim: tabstop=4 expandtab shiftwidth=4