[Python-es] Encender bits individuales en variable

Jesús Genicio jgenicio en gmail.com
Vie Jun 25 21:23:19 CEST 2010


El vie, 25-06-2010 a las 14:29 -0400, Jose Caballero escribió:
>         
>         
>                b_1Shot= 1
>                b_Pol= 2
>                b_R0= 4
>                b_R1= 8
>                b_TLF= 32
>                b_THF= 64
>                byt_Configuracion= 0
>         
>         UnboundLocalError: local variable 'bit_Configuracion'
>         referenced before
>         assignment
> 
> 
> 
> byt_Configuracion != bit_Configuracion

Si eso ya me dí cuenta de ello al poco de enviar el mensaje, pero aún
así me da el mismo fallo.

Traceback (most recent call last):
  File "ds1631.py", line 258, in cambio_grupo_resolucion
    bit_Conf ^= b_R0
UnboundLocalError: local variable 'bit_Conf' referenced before
assignment

S2
> _______________________________________________
> Python-es mailing list
> Python-es en python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/



Más información sobre la lista de distribución Python-es