Using function parameters to determine method kind
oliver.schoenborn at utoronto.ca
Sun Jun 6 14:56:55 CEST 2004
From: "Michele Simionato" <michele.simionato at poste.it>
> No, I had in mind this (contrived) example:
> class Outer(object):
> def outermeth(self1):
> class Inner(object):
> def innermeth(self2):
> It is nice to have the ability to give any name to "self".
> like that).
Strange, I would have thought that self1 would not be in scope (it's not in
the local scope and it's not in the global scope AFAICT). If true, you'd
have to have a parameter to your innermeth, which you can call whatever you
want so call it self1. Have scoping rules changed in Python?
More information about the Python-list