[Python-Dev] Using logging in the stdlib and its unit tests

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Dec 8 20:00:31 CET 2010

Antoine Pitrou <solipsis <at> pitrou.net> writes:

> But since you are the one you wrote the library and added error() in
> the first place, why are you trying to convince me that error() is
> not useful? Perhaps you should explain how error() is supposed to be
> used for if it's not supposed to log errors.

I didn't say error() [or actually exception(), which you mentioned] was useless,
I merely pointed out what the normal pattern of usage was. Georg, at least,
seemed to be agreeing with me.

> And my point, again, is that they want it to work by default *without*
> making such a positive statement. I'm not sure if I'm supposed to
> explain this using different words since you're not appearing to get it.

No, I'm getting it, I think. See my responses to Nick's posts.
> I'm sorry but your way of argumenting is really puzzling to me. You are
> trying to find counter-arguments against something which you *already*
> implemented yourself in logging.error().

I don't think I am, so one of us is misunderstanding the other, or perhaps both
of us are misunderstanding each other.

> If you're interested in having a theoretical argument about what a
> beautiful design should be (and if you want to argue about your own
> design decisions), I'll leave the discussion here. I'm only interested

No, I'm not interested in that. Like you I'm interested in practical matters,
but unlike you I have to make some implementation choices, going forward - so it
shouldn't be surprising that I want to talk around the issue to make sure that
no wrong decision gets made. Sorry if that offends you because it sometimes
seems to be stating the (to you) obvious.

> in the *practical* matter of logging having an useful behaviour by
> default, which apparently you don't really care about.

Actually, I don't think my response to Nick's post (about concurrent.futures)
could be characterized as "I don't care", as I even made a specific proposal
about how a change could be implemented.


Vinay Sajip

More information about the Python-Dev mailing list