Question about Pass-by-object-reference?
rosuav at gmail.com
Wed Jul 23 08:07:20 CEST 2014
On Wed, Jul 23, 2014 at 3:35 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> If you say "nothing is being passed", then my response would be "Oh, you
> aren't calling the function at all? Or just calling it with no arguments?"
The latter. Suppose you have a class method that takes optional args,
and you override it in a subclass. The subclass's method may choose to
swallow any args it was given, and "pass nothing" to the super()
method. I have code doing exactly this, and sometimes it's important
to comment it as such (although I'll usually word it as "pass on no
args" or something, rather than just "pass nothing"). But yes. If
there are any arguments, they are being passed.
More information about the Python-list