[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

%x unsigned?

Hrvoje Niksic

3/14/2008 3:00:00 PM

The %x conversion specifier is documented in
http://docs.python.org/lib/typesseq-st... as "Unsigned
hexadecimal (lowercase)." What does "unsigned" refer to?

>>> '0x%x' % 10
'0xa'
>>> '0x%x' % -10
'0x-a'

Is this a bug or is %x misdocumented?
7 Answers

D'Arcy J.M. Cain

3/14/2008 3:32:00 PM

0

On Fri, 14 Mar 2008 16:00:07 +0100
Hrvoje Niksic <hniksic@xemacs.org> wrote:
> The %x conversion specifier is documented in
> http://docs.python.org/lib/typesseq-st... as "Unsigned
> hexadecimal (lowercase)." What does "unsigned" refer to?
>
> >>> '0x%x' % 10
> '0xa'
> >>> '0x%x' % -10
> '0x-a'
>
> Is this a bug or is %x misdocumented?

I think it is working exactly as documented. It says that it displays
unsigned numbers. If you give it a negative number you get undefined
behaviour. Are you saying that the docs could be a little clearer?

--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.... | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

Richard Brodie

3/14/2008 3:59:00 PM

0


"Hrvoje Niksic" <hniksic@xemacs.org> wrote in message
news:87skytbbbc.fsf@mulj.homelinux.net...
> The %x conversion specifier is documented in
> http://docs.python.org/lib/typesseq-st... as "Unsigned
> hexadecimal (lowercase)." What does "unsigned" refer to?

It's obsolete, a fallout of int/long int unification.
See http://www.python.org/dev/peps...



Jonathan Gardner

3/14/2008 4:18:00 PM

0

On Mar 14, 8:00 am, Hrvoje Niksic <hnik...@xemacs.org> wrote:
> The %x conversion specifier is documented inhttp://docs.python.org/lib/typesseq-stri... "Unsigned
> hexadecimal (lowercase)."  What does "unsigned" refer to?
>
> >>> '0x%x' % 10
> '0xa'

Somewhat unrelated, but have you seen the # modifier?
>>> '%#x' % 10
'0xa'

Dave Kelly

11/25/2011 10:25:00 PM

0


"Ray O'Hara" <raymond-ohara@hotmail.com> wrote in message n
>
> TP keep trying, someday, not today, but someday you'll be right about
> something.

Damn....Angry dude comes over from Fagbook and
gets schooled by Brother Ray-Ray!
Have you 2 Boston MF'ers ever met?...I'd fly in to peep dat!


volkfolk

11/26/2011 2:06:00 PM

0

On Nov 25, 3:29 pm, "Ray O'Hara" <raymond-oh...@hotmail.com> wrote:
> "volkfolk" <volkfo...@verizon.net> wrote in message
>
> news:20e8557e-c36e-4f83-8e59-95f55fb520e9@m7g2000vbc.googlegroups.com...
> On Nov 23, 6:48 pm, "Ray O'Hara" <raymond-oh...@hotmail.com> wrote:
>
>
>
>
>
>
>
>
>
> >http://www.rollingstone.com/music/lists/100-greatest-guitar......
>
> > worser than usual.
> > Paul Simon, Bonnie Raitt. Lou Reed.,Buddy Holly, all made it,
>
> > the top ten are
> > 10, Pete Townshend
> > 09 Duane Allman
> > 08 Eddy Van Halen
> > 07 Chuck Berry
> > 06 B.B.King
> > 05 Jeff Beck
> > 04 Keith Richards
> > 03 Jimmy Page
> > 02 Eric Clapton
> > 01 Jimi Hendrix.
>
> > Keef in the top 5?????
>
> > the Judges are listed and some clearly should have known better
>
> You continue to prove that you're a moron. Lists like this are
> meaningless, because "greatest" isn't a quantifiable measurement. It's
> all based on a subjective opinion, not a set a of measurable
> parameters.
>
> For lots of people, Keith is a great guitarist. He's certainly one of
> the most original guitarists in Rock and Roll, and if you had any
> fucking clue about what you were talking about, you'd actually know
> that
>
> Keep on posting your ignorance though, it's always good for a laugh or
> two
>
> Scot
>
> You
>
> ======================================================================
>
> TP keep trying, someday, not today, but someday you'll be right about
> something.

It will be well before you get anything right.

BTW keep it up with the 3rd grade nicknames, that's obviously about
where your intellect is

Scot

volkfolk

11/26/2011 2:14:00 PM

0

On Nov 25, 5:24 pm, "sweetbac" <sweet...@sbcglobal.net> wrote:
> "Ray O'Hara" <raymond-oh...@hotmail.com> wrote in message n
>
> > TP keep trying, someday, not today, but someday you'll be right about
> > something.
>
> Damn....Angry dude comes over from Fagbook and
> gets schooled by Brother Ray-Ray!
> Have you 2 Boston MF'ers ever met?...I'd fly in to peep dat

Come on Dave, Ray couldn't "school" anybody. He's got that rare
"Dubya" like combination of stupidity, arrogance and the inability to
admit when he's wrong about something.

Nothing lamer than a proud dunce

Scot

Ray O'Hara

11/26/2011 3:45:00 PM

0


"volkfolk" <volkfolk1@verizon.net> wrote in message
news:443c20f8-64f7-48ca-87cf-a048555f484b@s7g2000yqa.googlegroups.com...
On Nov 25, 3:29 pm, "Ray O'Hara" <raymond-oh...@hotmail.com> wrote:
> "volkfolk" <volkfo...@verizon.net> wrote in message
>
> news:20e8557e-c36e-4f83-8e59-95f55fb520e9@m7g2000vbc.googlegroups.com...
> On Nov 23, 6:48 pm, "Ray O'Hara" <raymond-oh...@hotmail.com> wrote:
>
>
>
>
>
>
>
>
>
> >http://www.rollingstone.com/music/lists/100-greatest-guitar......
>
> > worser than usual.
> > Paul Simon, Bonnie Raitt. Lou Reed.,Buddy Holly, all made it,
>
> > the top ten are
> > 10, Pete Townshend
> > 09 Duane Allman
> > 08 Eddy Van Halen
> > 07 Chuck Berry
> > 06 B.B.King
> > 05 Jeff Beck
> > 04 Keith Richards
> > 03 Jimmy Page
> > 02 Eric Clapton
> > 01 Jimi Hendrix.
>
> > Keef in the top 5?????
>
> > the Judges are listed and some clearly should have known better
>
> You continue to prove that you're a moron. Lists like this are
> meaningless, because "greatest" isn't a quantifiable measurement. It's
> all based on a subjective opinion, not a set a of measurable
> parameters.
>
> For lots of people, Keith is a great guitarist. He's certainly one of
> the most original guitarists in Rock and Roll, and if you had any
> fucking clue about what you were talking about, you'd actually know
> that
>
> Keep on posting your ignorance though, it's always good for a laugh or
> two
>
> Scot
>
> You
>
> ======================================================================
>
> TP keep trying, someday, not today, but someday you'll be right about
> something.

It will be well before you get anything right.

BTW keep it up with the 3rd grade nicknames, that's obviously about
where your intellect is

Scot

=====================================================================

TP, when thw best you can do is say "I know you are but what am I"
you need to give it up and slink off.