[issue7335] int/long discrepancy when formatting zero with "%.0d"

2010-08-10 Thread Mark Dickinson
Mark Dickinson added the comment: Out of date for 2.x. -- resolution: -> out of date status: open -> closed ___ Python tracker ___ __

[issue7335] int/long discrepancy when formatting zero with "%.0d"

2009-11-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with the 'should' (behave same way), but changing nothing will break no code. Given that the purpose of 2.7 is to aid 3.x migration, an argument could be made for matching the 3.x behavior. -- nosy: +tjreedy

[issue7335] int/long discrepancy when formatting zero with "%.0d"

2009-11-16 Thread Mark Dickinson
Changes by Mark Dickinson : -- title: int/long discrepancy when formatting zero with ".0d" -> int/long discrepancy when formatting zero with "%.0d" ___ Python tracker ___ ___

[issue7335] int/long discrepancy when formatting zero with ".0d"

2009-11-16 Thread Mark Dickinson
New submission from Mark Dickinson : In Python 2.x we have: >>> "%.0d" % 0 '' >>> "%.0d" % 0L '0' In Python 3.x: >>> "%.0d" % 0 '0' I think the 2.x behaviour for int comes directly from C's sprintf behaviour: section 7.19.6.1, p8 of the C99 standard says: "The result of converting a zero v