[pypy-dev] A very easy bug for newcomers

Костя Лопухин kostia.lopuhin at gmail.com
Tue Jun 19 06:56:28 CEST 2012


As Amaury Forgeot d'Arc noted here,
https://bitbucket.org/pypy/pypy/pull-request/69/fix-issue-1180-implement-bool-formatting#comment-8635
in CPython there is no specific code for booleans, but an empty
format_spec always delegate to str().
Is it better to try to achieve the same in PyPy? Or just delegate to
str if there is no format string, and to int formatting if there is
any, like here https://bitbucket.org/kostialopuhin/pypy-fix1180/changeset/99ddf04ded5a
?

And a second questing - where is the proper place for this discussion
- here, in the pull request, or in the issues in bugtracker?

2012/6/19 Armin Rigo <arigo at tunes.org>:
> Hi,
>
> On Mon, Jun 18, 2012 at 10:54 PM, Maciej Fijalkowski <fijall at gmail.com> wrote:
>> It seems that you should make simpler tests (as
>> in there is no need for self.s and self.b I think, why not use str and bool
>> builtins?)
>
> Ah, it came from the other tests of test_newformat.py; but these use
> "self.s" instead of "str or unicode".  "self.b()" is superflous, as
> you can use "bool()".
>
>
> A bientôt,
>
> Armin.


More information about the pypy-dev mailing list