[pyar] A beginner's guide to Python's namespaces, scope resolution, and the LEGB

Apokalyptica Painkiller apokalyptica79 en gmail.com
Mie Mayo 7 10:19:32 ART 2014


This is a short tutorial about Python's namespaces and the scope resolution
for variable names using the LEGB-rule. The following sections will provide
short example code blocks that should illustrate the problem followed by
short explanations. You can simply read this tutorial from start to end,
but I'd like to encourage you to execute the code snippets - you can either
copy & paste them, or for your convenience, simply download this IPython
notebook<https://raw.githubusercontent.com/rasbt/python_reference/master/tutorials/scope_resolution_legb_rule.ipynb>
.

Tutorial<http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/scope_resolution_legb_rule.ipynb?utm_content=bufferb8e67&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer>

-- 
I live each day
Like it's my last
I live for rock and roll
I never look back

I'm a rocker
Do as I feel as I say
I'm a rocker
And no one can take that away
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20140507/b7213ed0/attachment-0001.html>


More information about the pyar mailing list