On Fri, 17 Jun 2011 23:14:09 -0700, jmfauth wrote: >>>> '{:+#0{}b}'.format(255, 1 + 2 + 16) > +0b0000000011111111 >>>> '{:+#0{}b}'.format(-255, 1 + 2 + 16) > -0b0000000011111111 >>>> >>>> eval('{:+#0{}b}'.format(255, 1 + 2 + 16)) > 255 >>>> eval('{:+#0{}b}'.format(-255, 1 + 2 + 16)) > -255
Is this a question? Or did you just decide to share some code? Please leave enough context so that readers can understand what you are talking about. -- Steven -- http://mail.python.org/mailman/listinfo/python-list