[pyar] threading.local..

Gustavo Campanelli gedece en gmail.com
Mie Jul 13 14:34:42 ART 2011


En la primera parece que se asigna o crea la variable x con valor cinco,
pero si la variable no está declarada en local, entonces no va a existir en
el thead 2.

Gedece

On Wed, Jul 13, 2011 at 14:13, david weil <tenuki en gmail.com> wrote:

> Es esto un bug?
>
> >>> t1=threading.local()
> >>> t1.x = 5
> >>> t2=threading.local()
> >>> t2.x
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> AttributeError: 'thread._local' object has no attribute 'x'
> >>>
>
>
> Si no es un bug, no entiendo como debería funcionar o para que se usa...
>
> saludosss..
> dave
>
> ps: python 2.7.1.4.. activestate..
> --
>  There is no dark side of the moon really. Matter of fact it's all dark.
> _______________________________________________
> pyar mailing list pyar en python.org.ar
> http://listas.python.org.ar/listinfo/pyar
>
> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>
> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
> Argentina - http://www.usla.org.ar
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20110713/f301050f/attachment.html>


More information about the pyar mailing list