On 04/06/2016 03:08 PM, Random832 wrote: > On Wed, Apr 6, 2016, at 16:21, Charles T. Smith wrote: >> I just tried to write a recursive method in python - am I right that >> local >> variables are only lexically local scoped, so sub-instances have the same >> ones? Is there a way out of that? Do I have to push and pop my own >> simulated >> stack frame entry? > > No, and I'm not sure why you would think that.
Sounds like a confusion that might arise due to using a mutable default arg? Or generally passing a mutable arg and not understanding Python's calling semantics? Carl
signature.asc
Description: OpenPGP digital signature
-- https://mail.python.org/mailman/listinfo/python-list