[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Objects object.c,2.95,2.96 (original) (raw)
Tim Peters tim_one@email.msn.com
Fri, 18 Aug 2000 14:37:19 -0400
- Previous message: [Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Objects object.c,2.95,2.96
- Next message: [Python-Dev] Re: [Patches] [Patch #101055] Cookie.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Trent Mick]
> ... > if (vtp->tpcompare == NULL) { > ! Pyuintptrt iv = (Pyuintptrt)v; > ! Pyuintptrt iw = (Pyuintptrt)w; > ! return (iv < iw) ? -1 : 1;_ _> } Can't you just do the cast for the comparison instead of making new variables?
Any compiler worth beans will optimize them out of existence. In the meantime, it makes each line (to my eyes) short, clear, and something I can set a debugger breakpoint on in debug mode if I suspect the cast isn't working as intended.
- Previous message: [Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Objects object.c,2.95,2.96
- Next message: [Python-Dev] Re: [Patches] [Patch #101055] Cookie.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]