Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94310

Re: Integers with leading zeroes

Newsgroups comp.lang.python
Date 2015-07-21 11:41 -0700
References <55ab37fb$0$1661$c3e8da3$5496439d@news.astraweb.com> <mailman.823.1437499340.3674.python-list@python.org> <559ead35-8f92-49de-8fa2-a78d257eb0d6@googlegroups.com> <mailman.828.1437502018.3674.python-list@python.org> <5ede3a45-fddc-41ec-9c96-8772e38f80a9@googlegroups.com>
Message-ID <7a9b1ac8-0a8c-4e98-b519-3cb00b7e54d2@googlegroups.com> (permalink)
Subject Re: Integers with leading zeroes
From sohcahtoa82@gmail.com

Show all headers | View raw


On Tuesday, July 21, 2015 at 11:38:53 AM UTC-7, sohca...@gmail.com wrote:
> On Tuesday, July 21, 2015 at 11:07:43 AM UTC-7, Emile van Sebille wrote:
> > On 7/21/2015 10:58 AM, sohcahtoa82@gmail.com wrote:
> > >
> > > IMO, leading zeroes just looks like visual noise, and if I wanted to align numbers, I'd just use spaces.
> > >
> > 
> > Aligning numbers using spaces doesn't always align -- using zeros does.
> > 
> > Emile
> 
> You've got me confused.  They should align just fine if you're using a fixed-width font.
> 
> If you're not using a fixed-width font in your programming, then I don't know what to say to you.

I should probably state that I may use leading zeroes when using hexadecimal numbers.  For example, I might write 0x000ABCDE, rather than 0xABCDE, but that's only if I'm using a lot of 32-bit values.  If I only care about a single byte, I will use 0x01, for example.

But for base-10, I would never use leading zeroes.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Integers with leading zeroes Steven D'Aprano <steve@pearwood.info> - 2015-07-19 15:39 +1000
  Re: Integers with leading zeroes Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-18 23:46 -0600
  Re: Integers with leading zeroes "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-07-19 10:19 +0200
    Re: Integers with leading zeroes Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-19 12:58 -0700
  Re: Integers with leading zeroes Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-07-21 19:21 +0200
    Re: Integers with leading zeroes sohcahtoa82@gmail.com - 2015-07-21 10:58 -0700
      Re: Integers with leading zeroes Emile van Sebille <emile@fenx.com> - 2015-07-21 11:06 -0700
        Re: Integers with leading zeroes sohcahtoa82@gmail.com - 2015-07-21 11:38 -0700
          Re: Integers with leading zeroes sohcahtoa82@gmail.com - 2015-07-21 11:41 -0700
    Re: Integers with leading zeroes Steven D'Aprano <steve@pearwood.info> - 2015-07-22 10:55 +1000
      Re: Integers with leading zeroes Chris Angelico <rosuav@gmail.com> - 2015-07-22 11:10 +1000
        Re: Integers with leading zeroes Steven D'Aprano <steve@pearwood.info> - 2015-07-22 12:14 +1000
          Re: Integers with leading zeroes Chris Angelico <rosuav@gmail.com> - 2015-07-22 14:16 +1000
          Re: Integers with leading zeroes Laura Creighton <lac@openend.se> - 2015-07-22 09:12 +0200
            Re: Integers with leading zeroes alister <alister.nospam.ware@ntlworld.com> - 2015-07-22 09:09 +0000
              Re: Integers with leading zeroes Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-07-22 17:27 +0200
                Re: Integers with leading zeroes Grant Edwards <invalid@invalid.invalid> - 2015-07-22 15:47 +0000
              Re: Integers with leading zeroes MRAB <python@mrabarnett.plus.com> - 2015-07-22 16:38 +0100
                Re: Integers with leading zeroes Grant Edwards <invalid@invalid.invalid> - 2015-07-22 15:50 +0000
                Re: Integers with leading zeroes MRAB <python@mrabarnett.plus.com> - 2015-07-22 17:24 +0100
              Re: Integers with leading zeroes Chris Angelico <rosuav@gmail.com> - 2015-07-23 08:32 +1000
          Re: Integers with leading zeroes Laura Creighton <lac@openend.se> - 2015-07-22 09:31 +0200
          Re: Integers with leading zeroes Ben Finney <ben+python@benfinney.id.au> - 2015-07-22 18:40 +1000
            Re: Integers with leading zeroes Marko Rauhamaa <marko@pacujo.net> - 2015-07-22 12:10 +0300
              Re: Integers with leading zeroes Laura Creighton <lac@openend.se> - 2015-07-22 11:38 +0200
                Re: Integers with leading zeroes Marko Rauhamaa <marko@pacujo.net> - 2015-07-22 13:26 +0300
            Re: Integers with leading zeroes Grant Edwards <invalid@invalid.invalid> - 2015-07-22 13:51 +0000
              Re: Integers with leading zeroes Rustom Mody <rustompmody@gmail.com> - 2015-07-22 07:03 -0700
              Re: Integers with leading zeroes Steven D'Aprano <steve@pearwood.info> - 2015-07-23 01:14 +1000
                Re: Integers with leading zeroes Grant Edwards <invalid@invalid.invalid> - 2015-07-22 15:20 +0000
              Re: Integers with leading zeroes Michael Torrie <torriem@gmail.com> - 2015-07-22 20:11 -0600
                Re: Integers with leading zeroes Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-07-24 18:23 +1200
                Re: Integers with leading zeroes Chris Angelico <rosuav@gmail.com> - 2015-07-24 16:28 +1000
                Re: Integers with leading zeroes alister <alister.nospam.ware@ntlworld.com> - 2015-07-24 13:16 +0000

csiph-web