Chris Angelico wrote:
> On Sat, Jul 30, 2011 at 6:42 AM, Peter Otten <__pete...@web.de> wrote:
>> def format_pairs(pairs):
>> for template, value in pairs:
>> if value is None:
>> break
>> yield template.format(value)
>>
>
> Cool! May I suggest a trifling change:
>
> def format_pairs(*pairs):
>
On Sat, Jul 30, 2011 at 6:42 AM, Peter Otten <__pete...@web.de> wrote:
> def format_pairs(pairs):
> for template, value in pairs:
> if value is None:
> break
> yield template.format(value)
>
Cool! May I suggest a trifling change:
def format_pairs(*pairs):
for t
On Sat, Jul 30, 2011 at 5:40 AM, Josh Benner wrote:
> I'm writing a function to create a string that gets longer iff an argument
> is defined. In there a more elegant way than nesting all those ifs?
Your logic appears to be: Proceed along a specified list and stop when
you find that you don't ha
Josh Benner wrote:
> I'm writing a function to create a string that gets longer iff an argument
> is defined. In there a more elegant way than nesting all those ifs?
>
> def format_rsync_src_string(args, server="RSYNC"):
> """ Format an rsync source directory string. """
> if args.server
On Fri, Jul 29, 2011 at 1:07 PM, Wolfgang Rohdewald
wrote:
> On Freitag 29 Juli 2011, Josh Benner wrote:
> > if args.build not None:
>
> which python version understands this?
>
> --
> Wolfgang
>
Apparently the version running in my head understands it ;-)
Sorry about that how about this (replac
On Freitag 29 Juli 2011, Josh Benner wrote:
> if args.build not None:
which python version understands this?
--
Wolfgang
--
http://mail.python.org/mailman/listinfo/python-list