"Steven D'Aprano" <steve+comp.lang.pyt...@pearwood.info> a écrit dans le message de news:54898820$0$12989$c3e8da3$54964...@news.astraweb.com...


As I said, most programming languages work like this. But a small minority
use a different system, called "dynamic scoping". In dynamic scoping, it
doesn't matter *where* a function is defined, only where it is called. With
dynamic scoping, your code would have worked correctly.


Thank you  very much.

This is my mistake
I knew that a function defined in a scope "knows" the variables defined
in that scope, at least for reading (for writing, it is more complicated).
I didnt realize that my function/class was called, not defined in that
scope.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to