Recursive method in class
ast
none at gmail.com
Tue Oct 1 12:52:01 EDT 2019
Le 01/10/2019 à 13:18, Rhodri James a écrit :
> On 01/10/2019 08:37, ast wrote:
>> The problem is that "factorial" in line
>> "return n * factorial(self, n - 1)" should not have been found
>> because there is no factorial function defined in the current
>> scope.
>
> Not so. "factorial" is in the global scope of your module, which is
> always available.
>
yes, you rae right. It is clear now
More information about the Python-list
mailing list