A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-October/105107.html below:

support for alternative format styles

[Python-Dev] Change to logging Formatters: support for alternative format stylesVinay Sajip vinay_sajip at yahoo.co.uk
Sun Oct 31 15:55:34 CET 2010
Olemis Lang <olemis <at> gmail.com> writes:
> 
> On Fri, Oct 29, 2010 at 10:07 AM, Barry Warsaw <barry <at> python.org> wrote:
> > I haven't played with it yet, but do you think it makes sense to add a 
> > 'style' keyword argument to basicConfig()?  That would make it pretty easy
> > to get the formatting style you want without having to explicitly
> > instantiate a Formatter, at least for simple logging clients.
> >
> 
> Since this may be considered as a little sophisticated, I'd rather
> prefer these new classes to be added to configuration sections using
> fileConfig (and default behavior if missing), and still leave
> `basicConfig` unchanged (i.e. *basic*) .
> 

Actually it's no biggie to have an optional style argument for basicConfig.
People who don't use it don't have to specify it; the style argument would only
apply if format was specified.

For some people, use of {} over % is more about personal taste than about the
actual usage of str.format's flexibility; we may as well accommodate that
preference, as it encourages in a small way the use of {}-formatting.

Regards,

Vinay Sajip

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4